/* Material 3 color roles, seeded from the site's blue with a gold tertiary. */
:root {
  --primary: #2F5F98;
  --on-primary: #FFFFFF;
  --primary-container: #D5E3FF;
  --on-primary-container: #001C3B;
  --secondary-container: #DAE2F9;
  --on-secondary-container: #131C2B;
  --tertiary: #7A5900;
  --tertiary-container: #FFDEA6;
  --on-tertiary-container: #261900;
  --surface: #F9F9FF;
  --surface-low: #F3F3FA;
  --surface-container: #EDEDF4;
  --surface-high: #E7E8EE;
  --surface-highest: #E2E2E9;
  --on-surface: #191C20;
  --on-surface-variant: #43474E;
  --outline: #73777F;
  --outline-variant: #C3C6CF;
  --widget: rgba(249, 249, 255, 0.88);
  --log-i: #1B6E3C;
  --log-d: #2F5F98;
  --log-w: #8A5A00;

  --font-ui: "Roboto Flex", Roboto, system-ui, sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, monospace;
  --font-display: "Newsreader", ui-serif, Georgia, serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --s: 0.9;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #A7C8FF;
    --on-primary: #003060;
    --primary-container: #224777;
    --on-primary-container: #D5E3FF;
    --secondary-container: #3E4759;
    --on-secondary-container: #DAE2F9;
    --tertiary: #EDC06C;
    --tertiary-container: #5C4300;
    --on-tertiary-container: #FFDEA6;
    --surface: #111318;
    --surface-low: #191C20;
    --surface-container: #1D2024;
    --surface-high: #282A2F;
    --surface-highest: #33353A;
    --on-surface: #E2E2E9;
    --on-surface-variant: #C3C6CF;
    --outline: #8D9199;
    --outline-variant: #43474E;
    --widget: rgba(29, 32, 36, 0.86);
    --log-i: #7AD69A;
    --log-d: #A7C8FF;
    --log-w: #EDC06C;

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --primary: #A7C8FF;
  --on-primary: #003060;
  --primary-container: #224777;
  --on-primary-container: #D5E3FF;
  --secondary-container: #3E4759;
  --on-secondary-container: #DAE2F9;
  --tertiary: #EDC06C;
  --tertiary-container: #5C4300;
  --on-tertiary-container: #FFDEA6;
  --surface: #111318;
  --surface-low: #191C20;
  --surface-container: #1D2024;
  --surface-high: #282A2F;
  --surface-highest: #33353A;
  --on-surface: #E2E2E9;
  --on-surface-variant: #C3C6CF;
  --outline: #8D9199;
  --outline-variant: #43474E;
  --widget: rgba(29, 32, 36, 0.86);
  --log-i: #7AD69A;
  --log-d: #A7C8FF;
  --log-w: #EDC06C;

  color-scheme: dark;
}

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

[hidden] { display: none !important; }

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

body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: #F2F3F7;
  background: #0E1116;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p, h1, h2, h3, h4, ol, ul, figure { margin: 0; }

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

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.ms {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  user-select: none;
}

/* Stage: blurred wallpaper behind the intro and the phone */

.stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vw, 96px);
  min-height: 100%;
  padding: 24px clamp(24px, 4vw, 56px);
  isolation: isolate;
}

.stage::before {
  content: "";
  position: fixed;
  inset: -40px;
  z-index: -1;
  background: url("/assets/berkeley.jpg") center / cover;
  filter: blur(36px) saturate(1.1) brightness(0.45);
}

/* Intro (desktop) */

.intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: 400px;
}

.intro-name {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.intro-tag {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.25;
}

.intro-tag em {
  display: block;
  color: #A9C7F2;
}

.intro-text {
  font-size: 17px;
  color: #C9CED8;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.intro-button {
  padding: 11px 20px;
  border-radius: 999px;
  background: #F2F3F7;
  color: #111318;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.intro-button--quiet {
  background: transparent;
  color: #F2F3F7;
  box-shadow: inset 0 0 0 1px rgba(242, 243, 247, 0.35);
}

.intro-hint {
  font-size: 14px;
  color: #9AA1AE;
}

.intro-hint a { color: #C9CED8; }

kbd {
  padding: 1px 6px;
  border: 1px solid rgba(242, 243, 247, 0.3);
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Device */

/* The device is 436 x 916 (screen plus bezel), scaled to fit the window. */
.device-slot {
  flex: none;
  width: calc(436px * var(--s));
  height: calc(916px * var(--s));
}

.device {
  width: 436px;
  transform: scale(var(--s));
  transform-origin: top left;
  padding: 12px;
  border-radius: 56px;
  background: #1A1C20;
  box-shadow:
    inset 0 0 0 2px #3A3D44,
    0 30px 80px rgba(0, 0, 0, 0.55);
}

.screen {
  position: relative;
  width: 412px;
  height: 892px;
  overflow: hidden;
  border-radius: 44px;
  background: var(--surface);
  color: var(--on-surface);
  container-type: inline-size;
}

/* Status bar */

.statusbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 6px 28px 0;
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  pointer-events: none;
}

.statusbar-icons { display: flex; gap: 4px; }
.statusbar-icons .ms { font-size: 17px; font-variation-settings: "FILL" 1; }

.screen.in-app .statusbar { color: var(--on-surface); }

/* Home */

.home {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 56px 20px 40px;
  overflow-y: auto;
  color: #FFFFFF;
  /* The photo is landscape: sit it low so faces clear the profile widget,
     and fade the top into a solid color behind the glance text. */
  background:
    linear-gradient(to bottom, #1F2A36 0, #1F2A36 22%, rgba(31, 42, 54, 0) 36%, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, 0.5)),
    url("/assets/berkeley.jpg") 42% bottom / auto 78% no-repeat,
    #1F2A36;
  transition: transform 300ms var(--ease), filter 300ms var(--ease);
}

.screen.in-app .home {
  transform: scale(0.94);
  filter: brightness(0.6);
}

.glance { padding: 4px 8px 0; }

.glance-date {
  font-size: 24px;
  font-weight: 400;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.glance-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #5CC98D;
  box-shadow: 0 0 0 3px rgba(92, 201, 141, 0.3);
}

.profile-widget {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px 16px;
  padding: 18px;
  border-radius: 28px;
  background: var(--widget);
  color: var(--on-surface);
  backdrop-filter: blur(12px);
}

.profile-widget img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-name {
  font-size: 20px;
  font-weight: 600;
}

.profile-tag {
  font-family: var(--font-display);
  font-size: 17px;
  font-style: italic;
  color: var(--on-surface-variant);
}

.profile-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.chip-button {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 600;
}

.chip-button--tonal {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.home-spacer { flex: 1; min-height: 8px; }

.app-grid,
.dock {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 8px;
}

.dock {
  padding: 14px 8px 10px;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 16px;
}

.app-icon .icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
  transition: transform 160ms var(--ease);
}

.app-icon:hover .icon { transform: scale(1.06); }
.app-icon:active .icon { transform: scale(0.94); }

.app-icon .ms { font-size: 28px; }

.icon-text {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.icon-text--ru {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
}

.app-icon .label {
  max-width: 100%;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Heads-up notification */

.heads-up {
  position: absolute;
  top: 46px;
  left: 10px;
  right: 10px;
  z-index: 40;
  animation: heads-up-in 420ms var(--ease) both;
}

.heads-up.is-leaving { animation: heads-up-out 260ms var(--ease) both; }

.heads-up-body {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 24px;
  background: var(--surface-high);
  color: var(--on-surface);
  text-align: left;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
}

.heads-up-body img {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.heads-up-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.heads-up-title span {
  font-weight: 400;
  color: var(--on-surface-variant);
}

.heads-up-text {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  color: var(--on-surface-variant);
}

@keyframes heads-up-in {
  from { transform: translateY(-140%); }
  to { transform: none; }
}

@keyframes heads-up-out {
  to { transform: translateY(-140%); }
}

/* Apps */

.app {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  padding-top: 40px;
  background: var(--surface);
  color: var(--on-surface);
  transform-origin: var(--ox, 50%) var(--oy, 50%);
}

.app.is-opening { animation: app-in 320ms var(--ease) both; }
.app.is-closing { animation: app-out 220ms var(--ease) both; }

@keyframes app-in {
  from { opacity: 0; transform: scale(0.2); border-radius: 50%; }
  to { opacity: 1; transform: none; border-radius: 0; }
}

@keyframes app-out {
  to { opacity: 0; transform: scale(0.6); }
}

.appbar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 12px 0 6px;
  flex: none;
}

.appbar-back {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.appbar-back:hover { background: var(--surface-high); }

.appbar-title {
  font-size: 22px;
  font-weight: 400;
  outline: none;
}

.appbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.app-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 4px 16px 48px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.app-body > * { flex-shrink: 0; }

.app-headline {
  padding: 0 4px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.2;
}

.app-headline em {
  display: block;
  color: var(--primary);
}

.app-sub {
  padding: 0 4px;
  color: var(--on-surface-variant);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 24px;
  background: var(--surface-container);
}

.card-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary);
}

.card p { color: var(--on-surface-variant); }

.card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* Lists inside cards (contact details, settings) */

.list {
  gap: 0;
  padding: 6px 0;
  list-style: none;
}

.list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.list li > .ms { color: var(--on-surface-variant); }

.list strong {
  display: block;
  font-weight: 500;
  color: var(--on-surface);
}

.list li > span:not(.ms),
.switch-row,
.row-button {
  flex: 1;
  font-size: 14px;
  color: var(--on-surface-variant);
  text-align: left;
}

.switch-row { cursor: pointer; }

.group-label {
  padding: 8px 4px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* Contact */

.contact-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 4px;
  text-align: center;
}

.contact-hero img {
  width: 120px;
  height: 120px;
  margin-bottom: 8px;
  border-radius: 50%;
  object-fit: cover;
}

.contact-hero h3 {
  font-size: 28px;
  font-weight: 400;
}

.contact-hero p {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  color: var(--on-surface-variant);
}

.quick-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.quick-actions > * {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 92px;
  padding: 12px 8px;
  border-radius: 20px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.quick-actions .icon-text { font-size: 20px; line-height: 24px; }

.name-entry-word {
  font-family: var(--font-display);
  font-size: 32px;
  font-style: italic;
  line-height: 1.1;
  color: var(--on-surface) !important;
}

.name-entry-meta {
  font-size: 13px;
}

.name-entry-meta i { font-family: var(--font-display); }

.name-entry-defs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
  color: var(--on-surface-variant);
}

.name-entry-defs li::marker { color: var(--tertiary); }

/* How I work */

.principles {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.principles li { counter-increment: principle; }

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  font-family: var(--font-display);
  color: var(--tertiary);
}

/* Career */

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--outline);
  border-radius: 999px;
  overflow: hidden;
}

.segmented button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  font-size: 14px;
  font-weight: 500;
}

.segmented button + button { border-left: 1px solid var(--outline); }

.segmented button[aria-selected="true"] {
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.segmented .ms { font-size: 18px; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.role-dates {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary) !important;
}

.role ul {
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--on-surface-variant);
}

.role li::marker { color: var(--outline); }

.logcat {
  padding: 14px;
  border-radius: 20px;
  background: #0B0D10;
  color: #D7DAE0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
}

.logcat-cmd {
  margin-bottom: 8px;
  color: #8D9199;
}

.logcat ol {
  padding: 0;
  list-style: none;
}

.logcat li {
  display: grid;
  grid-template-columns: 7ch 1.5ch 9ch minmax(0, 1fr);
  gap: 0 6px;
  padding: 2px 0;
}

.logcat b { font-weight: 500; }
.lv-i b, .lv-i span:nth-child(3) { color: #7AD69A; }
.lv-d b, .lv-d span:nth-child(3) { color: #A7C8FF; }
.lv-w b, .lv-w span:nth-child(3) { color: #EDC06C; }
.logcat li span:first-child { color: #8D9199; }

/* Studio */

.dev-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px;
}

.dev-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  font-family: var(--font-display);
  font-size: 28px;
  font-style: italic;
}

.dev-hero h3 {
  font-size: 22px;
  font-weight: 500;
}

.dev-hero p {
  font-size: 14px;
  color: var(--primary);
}

.filled-button,
.tonal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.filled-button {
  align-self: stretch;
  height: 44px;
  background: var(--primary);
  color: var(--on-primary);
}

.filled-button .ms { font-size: 18px; }

.tonal-button {
  flex: none;
  height: 36px;
  padding: 0 18px;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
}

.store-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 0 0;
  list-style: none;
}

.store-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
}

.store-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.store-icon--tile {
  padding: 7px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--outline-variant);
}

.store-list h4 {
  font-size: 16px;
  font-weight: 600;
}

.store-list p {
  font-size: 13px;
  line-height: 1.4;
  color: var(--on-surface-variant);
}

.store-list li > div {
  flex: 1;
  min-width: 0;
}

.store-list .store-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--outline);
}

/* Wallet */

.passes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  list-style: none;
}

.pass {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 132px;
  padding: 20px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: transform 160ms var(--ease);
}

.pass:hover { transform: translateY(-2px); }

.pass--1 { background: linear-gradient(135deg, #3B2A5C, #6A4C93); color: #FFFFFF; }
.pass--2 { background: linear-gradient(135deg, #0F5C7A, #2E9CCA); color: #FFFFFF; }
.pass--3 { background: linear-gradient(135deg, #2B2F36, #59606B); color: #FFFFFF; }
.pass--4 { background: linear-gradient(135deg, #B5651D, #E5A54B); color: #1A1206; }

.pass-name {
  font-size: 20px;
  font-weight: 600;
}

.pass-desc {
  font-size: 14px;
  opacity: 0.85;
}

.pass-go {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 20px;
  opacity: 0.8;
}

/* Photos */

.photo {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
}

.photo figcaption {
  padding: 0 4px;
  font-size: 13px;
  color: var(--on-surface-variant);
}

/* Settings */

.row-button {
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.switch {
  appearance: none;
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  margin: 0;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--surface-highest);
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease);
}

.switch::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--outline);
  transform: translateY(-50%);
  transition: left 160ms var(--ease), width 160ms var(--ease), height 160ms var(--ease), background 160ms var(--ease);
}

.switch:checked {
  border-color: var(--primary);
  background: var(--primary);
}

.switch:checked::after {
  left: 22px;
  width: 24px;
  height: 24px;
  background: var(--on-primary);
}

/* Messages */

.thread {
  gap: 8px;
  padding-bottom: 16px;
}

.thread-day {
  align-self: center;
  margin: 4px 0 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-variant);
}

.bubble {
  align-self: flex-start;
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 20px 20px 20px 6px;
  background: var(--surface-highest);
  font-size: 15px;
  line-height: 1.45;
}

.smart-replies {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.smart-replies a {
  padding: 8px 14px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.smart-replies a:hover { background: var(--surface-container); }

.composer {
  flex: none;
  padding: 10px 14px 44px;
}

.composer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  border-radius: 999px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 600;
  text-decoration: none;
}

/* Toast */

.toast {
  position: absolute;
  left: 50%;
  bottom: 64px;
  z-index: 50;
  max-width: calc(100% - 48px);
  padding: 10px 18px;
  border-radius: 999px;
  background: #2E3036;
  color: #F2F3F7;
  font-size: 14px;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Gesture navigation bar */

.navbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: flex;
  justify-content: center;
  padding: 10px 0 10px;
}

.nav-pill {
  width: 120px;
  height: 18px;
  border-radius: 999px;
  position: relative;
}

.nav-pill::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
}

.screen.in-app .navbar { background: var(--surface); }
.screen.in-app .nav-pill::after { background: var(--on-surface); opacity: 0.6; }

/* Developer options: Show layout bounds */

.screen.bounds *:not(.ms) {
  outline: 1px solid rgba(255, 64, 129, 0.75) !important;
  outline-offset: -1px;
}

/* On a phone, the page is the phone */

@media (max-width: 720px) {
  html, body { height: auto; }
  body { background: var(--surface); }

  .stage {
    display: block;
    padding: 0;
  }

  .stage::before { content: none; }

  .intro {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .device-slot {
    width: auto;
    height: auto;
  }

  .device {
    width: auto;
    transform: none;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .screen {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }

  .statusbar,
  .navbar { display: none; }

  .home { padding: max(24px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)); }
  .heads-up { top: 12px; }
  .app { padding-top: env(safe-area-inset-top); }
  .composer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .app.is-opening,
  .app.is-closing,
  .heads-up,
  .heads-up.is-leaving { animation-duration: 1ms; }
  .home, .app-icon .icon, .pass, .toast { transition: none; }
}
