/* One UI home screen (js/home-screen.js), measured from the founder's Galaxy screenshots (reference/oneui-home/,
   738×1600 → 384×832 dp). Lives inside .vs-screen, so 1 dp = var(--u). */
.hs {
  position: absolute; inset: 0; z-index: 0; overflow: hidden; color: #fff;
  background: linear-gradient(oklch(0.23 0.004 60), oklch(0.27 0.008 70) 50%, oklch(0.33 0.015 80));
  font-family: var(--vs-ui);
}
/* his wallpaper, edge to edge: the real photo from his screenshot, with only the areas under its UI (status bar,
   page dots, dock icons, gesture bar) reconstructed from the neighbouring sofa fabric (assets/phone/wallpaper.*) */
.hs-wall { position: absolute; inset: 0; }
.hs-wall img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hs-status { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: calc(40 * var(--u)); display: flex; align-items: center; gap: calc(8 * var(--u)); padding: calc(6 * var(--u)) calc(22 * var(--u)) 0; }
.hs-time { font-size: calc(15.5 * var(--u)); font-weight: 600; letter-spacing: 0.01em; }
.hs-sys { margin-left: auto; display: flex; align-items: center; gap: calc(4 * var(--u)); }
.hs-si { width: calc(14 * var(--u)); height: calc(14 * var(--u)); fill: currentColor; }
.hs-batt { display: grid; place-items: center; min-width: calc(24 * var(--u)); height: calc(15 * var(--u)); padding: 0 calc(4 * var(--u)); border-radius: 999px; background: oklch(0.85 0 0 / 0.55); color: oklch(0.15 0 0); font-size: calc(10.5 * var(--u)); font-weight: 700; }
.hs-mic { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: oklch(0.72 0.19 150); margin-left: calc(2 * var(--u)); }
/* the live chip, like One UI's media chip in the status bar */
.hs-chip { display: inline-flex; align-items: center; gap: calc(5 * var(--u)); height: calc(23 * var(--u)); padding: 0 calc(10 * var(--u)) 0 calc(6 * var(--u)); border-radius: 999px;
  background: var(--vs-accent-deep); font-size: calc(13 * var(--u)); font-weight: 600; white-space: nowrap; }
/* Vivi's app icon and chip: its orb (css/vivi-orb.css) */
.hs-vivi { --orb-size: calc(40 * var(--u)); }
.hs-vivi--chip { --orb-size: calc(15 * var(--u)); }
/* the search widget: a neutral pill (no third-party logo) */
.hs-search { position: absolute; left: calc(24 * var(--u)); right: calc(24 * var(--u)); top: calc(89 * var(--u)); height: calc(50 * var(--u));
  display: flex; align-items: center; gap: calc(26 * var(--u)); padding: 0 calc(22 * var(--u)); border-radius: 999px; background: light-dark(oklch(0.97 0.003 260 / 0.9), oklch(0.33 0.004 260 / 0.88)); color: light-dark(oklch(0.3 0.01 260), oklch(0.96 0 0)); }
.hs-search .hs-si { width: calc(22 * var(--u)); height: calc(22 * var(--u)); }
.hs-si--line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hs-search-gap { flex: 1; }
/* icons: a 5-column grid, One UI squircles, white labels with a soft shadow */
.hs-row, .hs-grid { position: absolute; left: calc(14 * var(--u)); right: calc(14 * var(--u)); display: grid; grid-template-columns: repeat(5, 1fr); row-gap: calc(24 * var(--u)); }
.hs-row--top { top: calc(177 * var(--u)); }
.hs-grid { top: calc(472 * var(--u)); }
.hs-app { position: relative; display: grid; justify-items: center; gap: calc(7 * var(--u)); }
.hs-icon { position: relative; display: grid; place-items: center; width: calc(54 * var(--u)); height: calc(54 * var(--u)); background: oklch(0.93 0.005 270); color: #fff; }
/* the One UI squircle (superellipse n = 3, fitted on the founder's screenshot; assets/phone/icons/squircle.svg). Image
   icons carry it in their own alpha; drawn icons (Vivi, fallbacks, the folder) are masked with the same shape. No ring,
   no border, no shadow: the edge is the icon's own pixels. */
.hs-icon:not(.hs-icon--img, .hs-icon--folder) { -webkit-mask: url(../assets/phone/icons/squircle.svg) center / 100% 100% no-repeat; mask: url(../assets/phone/icons/squircle.svg) center / 100% 100% no-repeat; }
.hs-app[data-pressed] .hs-icon { scale: 0.92; filter: brightness(0.85); }
.hs-g { width: 56%; height: 56%; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.hs-g .f { fill: currentColor; stroke: none; }
.hs-g text { fill: currentColor; stroke: none; font: 700 8px/1 var(--vs-ui); }
.hs-label { font-size: calc(11.5 * var(--u)); line-height: 1.15; white-space: nowrap; text-shadow: 0 0 calc(3 * var(--u)) oklch(0 0 0 / 0.55), 0 calc(1 * var(--u)) calc(2 * var(--u)) oklch(0 0 0 / 0.4); }
.hs-badge { position: absolute; top: calc(-5 * var(--u)); right: calc(-5 * var(--u)); display: grid; place-items: center; min-width: calc(19 * var(--u)); height: calc(19 * var(--u)); border-radius: 999px; background: light-dark(oklch(0.62 0.21 33), oklch(0.64 0.15 33)); color: oklch(0.98 0.015 33); font-size: calc(11.5 * var(--u)); font-weight: 600; }
.hs-icon--phone { background: oklch(0.66 0.18 148); }
.hs-icon--messages { background: oklch(0.97 0.003 270); color: oklch(0.6 0.19 258); }
.hs-icon--camera { background: oklch(0.84 0.008 260); color: oklch(0.22 0.01 260); }
.hs-icon--gallery { background: linear-gradient(140deg, oklch(0.66 0.24 355), oklch(0.58 0.24 310)); }
.hs-icon--clock { background: oklch(0.93 0.008 280); color: oklch(0.25 0.02 280); }
.hs-icon--calendar { background: oklch(0.98 0 0); color: oklch(0.55 0.19 258); }
.hs-icon--weather { background: linear-gradient(160deg, oklch(0.78 0.11 230), oklch(0.6 0.16 252)); }
.hs-icon--settings { background: oklch(0.55 0.03 260); }
.hs-icon--notes { background: oklch(0.76 0.16 62); }
.hs-icon--files { background: oklch(0.83 0.14 85); }
.hs-icon--music { background: oklch(0.55 0.2 300); }
.hs-icon--maps { background: oklch(0.72 0.14 165); }
.hs-icon--maps .h { fill: oklch(0.72 0.14 165); stroke: none; }
.hs-icon--hours { background: oklch(0.62 0.15 150); }
.hs-icon--calculator { background: oklch(0.92 0.008 260); color: oklch(0.3 0.02 260); }
.hs-icon--recorder { background: oklch(0.62 0.21 25); }
/* Vivi: a pearl squircle with the orb in light mode, a deep one in dark mode (like One UI system icons) */
.hs-icon--vivi { background: light-dark(radial-gradient(120% 120% at 30% 20%, oklch(0.995 0.002 260), oklch(0.9 0.012 260)), radial-gradient(120% 120% at 30% 20%, oklch(0.34 0.03 262), oklch(0.2 0.025 265))); }
.hs-hu-icon .hs-icon--vivi .hs-vivi { --orb-size: calc(32 * var(--u)); }
/* page indicator: list, home, dot */
.hs-pages { position: absolute; left: 0; right: 0; top: calc(692 * var(--u)); display: flex; justify-content: center; align-items: center; gap: calc(9 * var(--u)); }
.hs-pages i { display: block; }
.hs-p-list { width: calc(8 * var(--u)); height: calc(6 * var(--u)); border-block: calc(1.6 * var(--u)) solid oklch(1 0 0 / 0.75); }
.hs-p-home { width: calc(9 * var(--u)); height: calc(8 * var(--u)); background: #fff; clip-path: polygon(50% 0, 100% 45%, 100% 100%, 0 100%, 0 45%); }
.hs-p-dot { width: calc(7 * var(--u)); height: calc(7 * var(--u)); border-radius: 50%; background: oklch(1 0 0 / 0.6); }
.hs-dock { position: absolute; left: calc(14 * var(--u)); right: calc(14 * var(--u)); top: calc(739 * var(--u)); display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; }
/* a heads-up notification (One UI 7; dark on a dark phone, light on a light one, like the rest of the OS), measured from reference/oneui-home/ref-1952.jpeg (738 px = 384 u):
   a translucent stadium card 75 u tall, 11 u from the edges; real app icon 44 u; sender 14 u semibold; time and
   secondary 11 u muted; the message 12.5 u; a 38 u contact avatar; a chevron */
.hs-headsup {
  position: absolute; z-index: 4; left: calc(11 * var(--u)); right: calc(11 * var(--u)); top: calc(38 * var(--u)); height: calc(75 * var(--u));
  display: flex; align-items: center; gap: calc(16 * var(--u)); padding: 0 calc(22 * var(--u)) 0 calc(16 * var(--u));
  border-radius: 999px; background: light-dark(oklch(0.985 0.002 270 / 0.9), oklch(0.36 0.003 270 / 0.86)); backdrop-filter: blur(18px) saturate(1.1);
  color: light-dark(oklch(0.2 0 0), oklch(0.97 0 0));
}
.hs-hu-icon .hs-app { display: block; }
.hs-hu-icon .hs-icon { width: calc(44 * var(--u)); height: calc(44 * var(--u)); }
.hs-hu-body { flex: 1; min-width: 0; display: grid; gap: calc(1 * var(--u)); line-height: 1.2; }
.hs-headsup p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-hu-l1 { display: flex; align-items: baseline; gap: calc(9 * var(--u)); font-size: calc(11 * var(--u)); color: light-dark(oklch(0.48 0.005 270), oklch(0.8 0 0)); }
.hs-hu-l1 b { font-size: calc(14.5 * var(--u)); font-weight: 600; color: light-dark(oklch(0.2 0 0), oklch(0.97 0 0)); overflow: hidden; text-overflow: ellipsis; }
.hs-hu-sub { overflow: hidden; text-overflow: ellipsis; }
.hs-hu-l1 time { flex: none; }
.hs-hu-text { font-size: calc(12.5 * var(--u)); color: light-dark(oklch(0.3 0 0), oklch(0.93 0 0)); }
.hs-hu-av { flex: none; display: grid; place-items: center; width: calc(38 * var(--u)); height: calc(38 * var(--u)); border-radius: 50%;
  background: oklch(0.6 0.05 var(--h)); color: oklch(0.96 0.01 var(--h)); font-size: calc(17 * var(--u)); font-weight: 400; }
.hs-hu-chev { flex: none; width: calc(19 * var(--u)); height: calc(19 * var(--u)); margin-left: calc(-6 * var(--u)); fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
/* a heads-up drops in from the status bar and settles with a light spring (300 ms); when the story goes back it rises
   back from below instead (ways.js sets .vs-screen[data-dir]) */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .hs-headsup { animation: hs-drop 0.3s cubic-bezier(0.05, 0.7, 0.1, 1) both; animation: hs-drop 0.3s linear(0, 0.37 12%, 0.75 26%, 1.02 46%, 1.04 58%, 1.01 76%, 1) both; }
  html:not([data-motion="off"]) .vs-screen[data-dir="back"] .hs-headsup { animation-name: hs-rise; }
}
@keyframes hs-drop { from { translate: 0 calc(-24 * var(--u)); opacity: 0; } 40% { opacity: 1; } }
@keyframes hs-rise { from { translate: 0 calc(16 * var(--u)); opacity: 0; } 40% { opacity: 1; } }

/* real icons (assets/phone/icons): the image fills the One UI squircle */
.hs-icon--img { background: none; }
.hs-icon--img picture, .hs-icon--img img { display: block; width: 100%; height: 100%; }
.hs-icon--img img { object-fit: contain; }
.hs-icon { overflow: visible; }
/* a folder: his Google folder, nine minis on a dark translucent squircle */
.hs-icon--folder { background: none; }
.hs-icon--folder::before { content: ""; position: absolute; inset: 0; background: oklch(0.12 0.004 260 / 0.72);
  -webkit-mask: url(../assets/phone/icons/squircle.svg) center / 100% 100% no-repeat; mask: url(../assets/phone/icons/squircle.svg) center / 100% 100% no-repeat; }
.hs-folder { position: relative; }
.hs-folder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; width: 74%; height: 74%; }
.hs-folder picture, .hs-folder img { display: block; width: 100%; height: 100%; }
.hs-label-dot { display: inline-block; width: calc(7 * var(--u)); height: calc(7 * var(--u)); margin-right: calc(2.5 * var(--u)); vertical-align: calc(0 * var(--u)); border-radius: 50%; border: calc(1.3 * var(--u)) solid currentColor; box-shadow: inset 0 0 0 calc(1.2 * var(--u)) transparent; background: radial-gradient(circle, currentColor 0 28%, transparent 32%); }
.hs-search-g { width: calc(27 * var(--u)); height: calc(27 * var(--u)); }
.hs-search .hs-si { width: calc(23 * var(--u)); height: calc(23 * var(--u)); }
.hs-search .hs-si .f { fill: currentColor; }

/* never show an empty device: a phone whose screen has no content yet stays invisible, then fades in (from 0.97) with
   its first render; a home screen's fallback colour is the wallpaper's own average tone, never the default navy */
.vs-screen:has(> .hs) { background: oklch(0.27 0.008 70); }
.vs-demo:has(> .vs-phone > .vs-screen:empty) { opacity: 0; scale: 0.97; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .vs-demo--ways { transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), scale 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
}
