/*
 * Mobile-only iOS presentation for Tomato Story.
 * Layer scale: system chrome 20, floating controls 40, modal overlays 100+.
 * The desktop browser never renders these nodes, so the macOS prototype keeps
 * its existing layout and interactions unchanged.
 */

html.mobile-experience,
html.mobile-experience body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #171923;
}

html.mobile-experience body {
  background-image: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html.mobile-experience #app,
html.mobile-experience #overlay-root {
  width: 100%;
  min-height: 100dvh;
}

.mobile-ios-root {
  --ios-ink: #252733;
  --ios-muted: #727582;
  --ios-line: #d9dce2;
  --ios-surface: #f7f8f9;
  --ios-canvas: #eceff2;
  --ios-accent: #7566f4;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  color: var(--ios-ink);
  background: var(--ios-canvas);
  isolation: isolate;
}

.mobile-ios-root button,
.mobile-ios-root input,
.mobile-ios-root select {
  font: inherit;
}

.mobile-ios-root button {
  cursor: default;
}

.mobile-ios-root button:active {
  transform: scale(.98);
}

.ios-qa-exit {
  position: absolute;
  z-index: 180;
  top: calc(114px + env(safe-area-inset-top));
  right: 8px;
  min-height: 30px;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 7px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f6f5f2;
  background: rgba(24,25,34,.82);
  box-shadow: 0 5px 15px rgba(13,14,21,.22);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font: 700 8px var(--font-pixel);
}

.ios-qa-exit i { position: relative; width: 9px; height: 9px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.ios-qa-exit i::after { content: ""; position: absolute; left: -2px; bottom: -2px; width: 12px; height: 2px; background: currentColor; transform: rotate(-45deg); transform-origin: left center; }

.ios-status-bar {
  position: absolute;
  z-index: 22;
  top: 0;
  left: 0;
  right: 0;
  height: calc(54px + env(safe-area-inset-top));
  padding: calc(9px + env(safe-area-inset-top)) 20px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  color: #252733;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

.ios-status-bar.is-dark { color: #f7f7f5; text-shadow: 0 1px 3px rgba(17,18,27,.35); }
.ios-status-bar > strong { min-width: 48px; font-size: 14px; letter-spacing: 0; }
.ios-status-icons { height: 16px; display: flex; align-items: center; gap: 6px; }
.ios-cell { width: 17px; height: 12px; display: flex; align-items: end; gap: 1px; }
.ios-cell i { width: 3px; background: currentColor; border-radius: 1px; }
.ios-cell i:nth-child(1) { height: 4px; }
.ios-cell i:nth-child(2) { height: 6px; }
.ios-cell i:nth-child(3) { height: 9px; }
.ios-cell i:nth-child(4) { height: 12px; }
.ios-wifi { position: relative; width: 16px; height: 12px; overflow: hidden; }
.ios-wifi::before, .ios-wifi::after, .ios-wifi i { content: ""; position: absolute; left: 50%; border: 2px solid currentColor; border-color: currentColor transparent transparent; border-radius: 50%; transform: translateX(-50%); }
.ios-wifi::before { top: 1px; width: 16px; height: 16px; }
.ios-wifi::after { top: 5px; width: 10px; height: 10px; }
.ios-wifi i { top: 9px; width: 4px; height: 4px; background: currentColor; border: 0; }
.ios-battery { position: relative; width: 23px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; }
.ios-battery::after { content: ""; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: currentColor; border-radius: 0 2px 2px 0; }
.ios-battery i { position: absolute; inset: 2px; width: 76%; background: currentColor; border-radius: 1px; }

.ios-island-wrap {
  position: absolute;
  z-index: 24;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  width: 126px;
  transform: translateX(-50%);
}

.ios-island-wrap.is-expanded { width: min(350px, calc(100vw - 24px)); }
.ios-dynamic-island {
  width: 126px;
  height: 36px;
  margin: 0 auto;
  border: 0;
  border-radius: 20px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #f8f8f6;
  background: #111219;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.ios-dynamic-island:disabled { opacity: 1; }
.ios-dynamic-island.is-live { width: 196px; padding: 3px 9px 3px 5px; }
.ios-dynamic-island > img { width: 31px; height: 31px; object-fit: contain; image-rendering: pixelated; }
.ios-island-task { min-width: 0; flex: 1; text-align: left; }
.ios-island-task b, .ios-island-task small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ios-island-task b { font-size: 8px; }
.ios-island-task small { margin-top: 1px; color: #a8abb6; font-size: 7px; }
.ios-dynamic-island > strong { color: #9e93ff; font: 700 9px var(--font-pixel-mono); }
.ios-island-camera { width: 8px; height: 8px; margin-left: auto; margin-right: 9px; border-radius: 50%; background: #172040; box-shadow: inset 0 0 0 2px #222a50; }
.ios-live-activity { margin-top: 5px; border-radius: 22px; padding: 13px; color: #f5f5f2; background: #111219; box-shadow: 0 14px 40px rgba(13,14,21,.36); }
.ios-live-activity > div:first-child { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.ios-live-activity img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.ios-live-activity span small, .ios-live-activity span strong { display: block; }
.ios-live-activity span small { color: #9e93ff; font-size: 8px; }
.ios-live-activity span strong { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.ios-live-activity > div > b { color: #f1d47d; font: 800 18px var(--font-pixel-mono); }
.ios-live-actions { margin-top: 11px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.ios-live-actions button { min-height: 38px; border: 1px solid #343642; border-radius: 10px; color: #f5f5f2; background: #242631; font-size: 10px; }

.ios-home-screen,
.ios-lock-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #29333c url('./assets/macos-wallpaper.jpg') center / cover no-repeat;
}

.ios-home-screen::before,
.ios-lock-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13,20,27,.12);
  pointer-events: none;
}

.ios-home-content {
  position: absolute;
  top: calc(70px + env(safe-area-inset-top));
  left: 18px;
  right: 18px;
  bottom: calc(104px + env(safe-area-inset-bottom));
  overflow: auto;
  scrollbar-width: none;
}

.ios-home-content::-webkit-scrollbar { display: none; }
.ios-tomato-widget {
  width: 100%;
  min-height: 154px;
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 22px;
  padding: 17px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  align-items: center;
  overflow: hidden;
  color: #f8f7f3;
  text-align: left;
  background: rgba(22,24,35,.78);
  box-shadow: inset 0 1px rgba(255,255,255,.16), 0 16px 36px rgba(17,18,28,.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
}

.ios-widget-copy span, .ios-widget-copy strong, .ios-widget-copy small { display: block; }
.ios-widget-copy span { color: #b5accf; font-size: 9px; }
.ios-widget-copy strong { margin-top: 9px; font-size: 15px; }
.ios-widget-copy small { margin-top: 8px; color: #d0d0d7; font-size: 9px; }
.ios-widget-progress { width: 100%; height: 4px; margin-top: 13px; overflow: hidden; background: rgba(255,255,255,.14); }
.ios-widget-progress i { display: block; height: 100%; background: #f0cf74; }
.ios-widget-pet { position: relative; height: 116px; display: grid; place-items: center; }
.ios-widget-pet > img { position: relative; z-index: 2; width: 112px; height: 112px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(3px 5px 0 rgba(8,9,15,.28)); }
.ios-widget-pet .pet-video-slot { z-index: 2; width: 118px; height: 118px; min-height: 0; margin: 0; background: transparent; }
.ios-widget-pet .pet-video-slot .keyed-video-canvas { object-fit: contain; transform: scale(1.12); }
.ios-widget-pet .pixel-pet { width: 118px; height: 118px; }
.ios-widget-pet .pixel-pet img { width: 100px; height: 108px; }
.ios-widget-rune { position: absolute; width: 96px; height: 96px; border: 2px dotted rgba(240,207,116,.72); border-radius: 50%; }
.ios-widget-rune::after { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(142,130,230,.75); transform: rotate(45deg); }
.ios-focus-notification { width: 100%; min-height: 62px; margin-top: 10px; border: 1px solid rgba(255,255,255,.24); border-radius: 18px; padding: 8px 11px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 9px; color: #f7f7f4; text-align: left; background: rgba(27,29,38,.72); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.ios-focus-notification img { width: 38px; height: 38px; border-radius: 9px; }
.ios-focus-notification small, .ios-focus-notification strong { display: block; }
.ios-focus-notification small { color: #b8b8c1; font: 500 9px -apple-system, sans-serif; }
.ios-focus-notification strong { margin-top: 4px; font-size: 9px; }

.ios-app-grid { margin-top: 23px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 19px 13px; }
.ios-app { min-width: 0; border: 0; padding: 0; display: grid; justify-items: center; gap: 6px; color: #f7f7f5; background: transparent; text-shadow: 0 1px 3px rgba(13,14,20,.48); }
.ios-app > span { position: relative; width: 56px; height: 56px; overflow: hidden; border-radius: 13px; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(12,14,21,.16); }
.ios-app small { width: 100%; overflow: hidden; text-overflow: ellipsis; font: 500 10px -apple-system, BlinkMacSystemFont, sans-serif; white-space: nowrap; }
.ios-app-tomato > span { background: #f3f0ea; }
.ios-app-tomato img { width: 56px; height: 56px; }
.ios-calendar-icon { background: #f7f7f5; color: #20212b; text-shadow: none; }
.ios-calendar-icon b { position: absolute; inset: 0 0 auto; height: 17px; padding-top: 4px; color: #fff; background: #ee5b55; font: 700 7px -apple-system, sans-serif; text-align: center; }
.ios-calendar-icon strong { padding-top: 13px; font: 300 28px -apple-system, sans-serif; }
.ios-flower-icon { background: #f7f7f5; }
.ios-flower-icon::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#f06b74, #f2bd58, #65b980, #5eb8d1, #7566f4, #e779a8, #f06b74); }
.ios-flower-icon i { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #f7f7f5; }
.ios-notes-icon { background: #f5f4ef; }
.ios-notes-icon::before { content: ""; position: absolute; inset: 0 0 auto; height: 15px; background: #f2cf45; }
.ios-notes-icon i { width: 34px; height: 22px; margin-top: 14px; border-top: 2px solid #b8b8b8; border-bottom: 2px solid #b8b8b8; }
.ios-settings-icon { background: #777b83; }
.ios-settings-icon::before { content: ""; width: 34px; height: 34px; border: 7px dotted #e9eaec; border-radius: 50%; }
.ios-settings-icon i { position: absolute; width: 13px; height: 13px; border: 3px solid #777b83; border-radius: 50%; background: #e9eaec; }
.ios-clock-icon { border: 2px solid #ececef; background: #24252d; }
.ios-clock-icon::before { content: ""; position: absolute; inset: 7px; border: 1px solid #d8d8da; border-radius: 50%; }
.ios-clock-icon i, .ios-clock-icon b { position: absolute; left: 27px; top: 27px; width: 2px; height: 16px; transform-origin: 1px 1px; background: #f3f3f1; }
.ios-clock-icon i { transform: rotate(18deg) translateY(-14px); }
.ios-clock-icon b { height: 13px; background: #f07966; transform: rotate(128deg) translateY(-11px); }
.ios-maps-icon { background: #d8e7cf; }
.ios-maps-icon::before, .ios-maps-icon::after { content: ""; position: absolute; background: #fff; }
.ios-maps-icon::before { width: 72px; height: 10px; transform: rotate(-36deg); }
.ios-maps-icon::after { width: 10px; height: 72px; transform: rotate(22deg); }
.ios-maps-icon i { z-index: 2; width: 16px; height: 16px; border: 4px solid #3478d2; border-radius: 50%; background: #fff; }
.ios-music-icon { color: #fff; background: #e85478; font: 700 30px -apple-system, sans-serif; text-shadow: none; }
.ios-ruflow-icon { background: #f5f8fb; }
.ios-ruflow-icon i { position: absolute; left: 11px; width: 35px; height: 10px; border-bottom: 5px solid #2b91ed; border-radius: 0 0 60% 50%; transform: skewX(-14deg); }
.ios-ruflow-icon i:nth-child(1) { top: 8px; }
.ios-ruflow-icon i:nth-child(2) { top: 21px; }
.ios-ruflow-icon i:nth-child(3) { top: 34px; width: 30px; }

.ios-home-dock {
  position: absolute;
  z-index: 18;
  left: 12px;
  right: 12px;
  bottom: calc(19px + env(safe-area-inset-bottom));
  height: 77px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 26px;
  padding: 10px 15px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  background: rgba(239,241,244,.34);
  -webkit-backdrop-filter: blur(22px) saturate(1.45);
  backdrop-filter: blur(22px) saturate(1.45);
}
.ios-dock-app { position: relative; width: 56px; height: 56px; border: 0; border-radius: 14px; display: grid; place-items: center; }
.ios-phone-icon { background: #4ab866; }
.ios-phone-icon i { width: 24px; height: 12px; border: 5px solid #fff; border-top: 0; border-radius: 0 0 18px 18px; transform: rotate(45deg); }
.ios-message-icon { background: #4abf68; }
.ios-message-icon i { width: 31px; height: 24px; border-radius: 50%; background: #fff; }
.ios-message-icon i::after { content: ""; position: absolute; left: 13px; bottom: 12px; border: 6px solid transparent; border-top-color: #fff; transform: rotate(24deg); }
.ios-safari-icon { background: #f8f8f6; }
.ios-safari-icon i { width: 38px; height: 38px; border: 3px solid #56a9e2; border-radius: 50%; }
.ios-safari-icon i::before, .ios-safari-icon i::after { content: ""; position: absolute; left: 27px; top: 12px; width: 3px; height: 21px; background: #e4585f; transform-origin: 50% 16px; transform: rotate(36deg); }
.ios-safari-icon i::after { top: 26px; height: 17px; background: #4389ca; transform: rotate(216deg); transform-origin: 50% 2px; }
.ios-camera-icon { background: #e8e9eb; }
.ios-camera-icon i { width: 31px; height: 24px; border-radius: 7px; background: #4d505a; }
.ios-camera-icon i::before { content: ""; position: absolute; left: 22px; top: 17px; width: 14px; height: 14px; border: 3px solid #babcc1; border-radius: 50%; }

.ios-assistive { position: absolute; z-index: 42; right: 10px; top: 56%; display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.ios-assistive-button { width: 45px; height: 45px; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; display: grid; place-items: center; background: rgba(28,30,39,.72); box-shadow: 0 5px 18px rgba(12,13,19,.26); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ios-assistive-button i { width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.84); border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(255,255,255,.16); }
.ios-assistive-menu { width: 188px; border: 1px solid rgba(255,255,255,.25); border-radius: 18px; padding: 7px; background: rgba(28,30,39,.91); box-shadow: 0 14px 38px rgba(10,11,17,.34); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.ios-assistive-menu button { width: 100%; min-height: 43px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); padding: 6px 8px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; color: #f5f5f2; text-align: left; background: transparent; font-size: 10px; }
.ios-assistive-menu button:last-child { border-bottom: 0; }
.ios-assistive-icon, .ios-assistive-app { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; background: #4d505b; }
.ios-assistive-app img { width: 27px; height: 27px; border-radius: 7px; }
.ios-assistive-icon.icon-home::before { content: ""; width: 12px; height: 12px; border: 2px solid #fff; border-top: 0; transform: rotate(45deg); }
.ios-assistive-icon.icon-lock::before { content: ""; width: 11px; height: 10px; border: 2px solid #fff; border-radius: 2px; box-shadow: 0 -6px 0 -2px #4d505b, 0 -6px 0 0 #fff; }
.ios-assistive-icon.icon-moon::before { content: ""; width: 13px; height: 13px; border-radius: 50%; box-shadow: -4px 1px 0 #fff; }

.ios-home-indicator {
  position: absolute;
  z-index: 45;
  left: 50%;
  bottom: calc(5px + env(safe-area-inset-bottom));
  width: 132px;
  height: 5px;
  border: 0;
  border-radius: 4px;
  background: rgba(22,23,31,.84);
  transform: translateX(-50%);
}
.surface-home .ios-home-indicator, .surface-lock .ios-home-indicator, .surface-aod .ios-home-indicator { background: rgba(247,247,245,.86); }
.ios-home-indicator:active { transform: translateX(-50%) scale(.97) !important; }

.ios-lock-screen { color: #f5f5f2; }
.ios-lock-screen.is-always-on { background-color: #101117; background-image: none; }
.ios-lock-screen.is-always-on::before { background: #101117; opacity: .78; }
.ios-lock-clock { position: relative; z-index: 3; margin-top: calc(82px + env(safe-area-inset-top)); text-align: center; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.ios-lock-clock span { display: block; font-size: 14px; }
.ios-lock-clock strong { display: block; margin-top: 4px; font-size: clamp(64px, 20vw, 88px); font-weight: 300; letter-spacing: -3px; line-height: 1; }
.is-always-on .ios-lock-clock { margin-top: calc(112px + env(safe-area-inset-top)); color: #a8a7ac; }
.is-always-on .ios-lock-clock strong { color: #dedde0; }
.ios-lock-widgets { position: relative; z-index: 3; margin: 38px 18px 0; display: grid; gap: 10px; }
.ios-lock-widget, .ios-lock-focus { border: 1px solid rgba(255,255,255,.22); border-radius: 18px; background: rgba(27,29,38,.66); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.ios-lock-widget { min-height: 82px; padding: 10px 12px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.ios-lock-pet { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; }
.ios-lock-pet > img { width: 58px; height: 58px; object-fit: contain; image-rendering: pixelated; }
.ios-lock-pet .pet-video-slot { width: 64px; height: 64px; min-height: 0; margin: 0; background: transparent; }
.ios-lock-pet .pet-video-slot .keyed-video-canvas { object-fit: contain; transform: scale(1.15); }
.ios-lock-pet .pixel-pet { width: 58px; height: 58px; }
.ios-lock-pet .pixel-pet img { width: 52px; height: 56px; }
.ios-lock-widget small, .ios-lock-widget strong { display: block; }
.ios-lock-widget small { color: #c1bbc9; font-size: 8px; }
.ios-lock-widget strong { margin-top: 5px; font-size: 10px; }
.ios-lock-widget > b { color: #f0cf74; font: 800 14px var(--font-pixel-mono); }
.ios-lock-focus { min-height: 48px; padding: 8px 13px; display: flex; align-items: center; gap: 10px; }
.ios-lock-focus strong { font-size: 9px; }
.ios-focus-moon { width: 27px; height: 27px; border-radius: 50%; background: #6958df; }
.ios-focus-moon::before { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: -5px 2px 0 #fff; }
.ios-lock-chevron { position: absolute; z-index: 4; left: 50%; bottom: calc(42px + env(safe-area-inset-bottom)); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(27,29,38,.42); transform: translateX(-50%); }
.ios-lock-chevron i { display: inline-block; width: 12px; height: 12px; border-left: 2px solid #fff; border-top: 2px solid #fff; transform: translateY(4px) rotate(45deg); }
.ios-aod-hint { position: absolute; left: 0; right: 0; bottom: calc(42px + env(safe-area-inset-bottom)); color: #777780; font-size: 8px; text-align: center; }

/* Mobile application shell */
.mobile-app-shell { position: absolute; inset: 0; overflow: hidden; color: var(--ios-ink); background: var(--ios-canvas); }
.mobile-app-shell > .ios-status-bar, .ios-system-app > .ios-status-bar { position: absolute; }
.mobile-app-header { position: absolute; z-index: 20; top: calc(52px + env(safe-area-inset-top)); left: 0; right: 0; height: 54px; padding: 0 14px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 52px; align-items: center; border-bottom: 1px solid var(--ios-line); background: rgba(247,248,249,.94); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.mobile-app-header > button { width: 38px; height: 38px; border: 0; border-radius: 50%; display: grid; place-items: center; background: transparent; }
.mobile-home-glyph { width: 15px; height: 15px; border: 2px solid #555867; border-top: 0; transform: rotate(45deg); }
.mobile-app-header > div { display: flex; align-items: center; justify-content: center; gap: 7px; }
.mobile-app-header img { width: 29px; height: 29px; border-radius: 7px; }
.mobile-app-header strong { font-size: 12px; }
.mobile-demo-label { justify-self: end; border: 1px solid #c9cbd2; border-radius: 8px; padding: 5px 6px; color: #6b6e7a; font-size: 7px; }
.mobile-app-content { position: absolute; z-index: 2; top: calc(106px + env(safe-area-inset-top)); left: 0; right: 0; bottom: calc(82px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: none; }
.mobile-app-content::-webkit-scrollbar { display: none; }
.mobile-page { min-height: 100%; padding: 16px 14px 28px; font-family: var(--font-pixel); }
.mobile-tab-bar { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(82px + env(safe-area-inset-bottom)); padding: 7px 7px calc(21px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--ios-line); background: rgba(247,248,249,.95); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.mobile-tab-bar button { min-width: 0; border: 0; padding: 2px; display: grid; justify-items: center; align-content: center; gap: 1px; color: #7d808a; background: transparent; }
.mobile-tab-bar button.active { color: var(--ios-accent); }
.mobile-tab-bar .nav-glyph { width: 30px; height: 30px; transform: scale(.72); }
.mobile-tab-bar small { font-size: 8px; }

.mobile-welcome { min-height: 160px; border-radius: 8px; padding: 18px; display: grid; grid-template-columns: minmax(0, 1fr) 116px; align-items: center; overflow: hidden; color: #f6f5f1; background: #252734; box-shadow: 0 9px 22px rgba(32,34,48,.13); }
.mobile-welcome > div:first-child > span { color: #aaa4c6; font-size: 8px; }
.mobile-welcome > div:first-child > strong { display: block; margin-top: 10px; color: #f0cf74; font: 800 32px var(--font-pixel-mono); }
.mobile-welcome > div:first-child > strong small { color: #c4c5cc; font-size: 8px; }
.mobile-welcome p { margin: 9px 0 0; color: #c4c5cc; font-size: 9px; }
.mobile-welcome-pet { height: 124px; display: grid; place-items: center; align-content: center; }
.mobile-welcome-pet > img { width: 108px; height: 102px; object-fit: contain; image-rendering: pixelated; }
.mobile-welcome-pet .pet-video-slot { width: 116px; height: 106px; min-height: 0; margin: 0; background: transparent; }
.mobile-welcome-pet .pet-video-slot .keyed-video-canvas { object-fit: contain; transform: scale(1.08); }
.mobile-welcome-pet .pixel-pet { width: 116px; height: 106px; }
.mobile-welcome-pet .pixel-pet img { width: 96px; height: 102px; }
.mobile-welcome-pet small { color: #d8d4e4; font-size: 8px; }

.mobile-start-panel { margin-top: 12px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 14px; background: var(--ios-surface); box-shadow: 0 7px 18px rgba(39,42,54,.06); }
.mobile-start-head { display: flex; align-items: center; justify-content: space-between; }
.mobile-start-head > span { color: var(--ios-muted); font-size: 9px; }
.mobile-start-head > strong { font: 800 28px var(--font-pixel-mono); }
.mobile-start-head small { margin-left: 3px; color: var(--ios-muted); font-size: 8px; }
.mobile-duration-row { margin: 12px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mobile-duration-row button { min-height: 42px; border: 1px solid #cfd1d7; border-radius: 8px; color: #5b5e69; background: #eceef1; font: 700 11px var(--font-pixel-mono); }
.mobile-duration-row button.active { border-color: var(--ios-accent); color: #fff; background: var(--ios-accent); box-shadow: inset 0 -3px rgba(41,35,91,.20); }
.mobile-field { width: 100%; min-height: 43px; border: 1px solid #cfd2d8; border-radius: 8px; padding: 0 11px; color: #292b36; background: #fff; font-size: 10px; outline: none; }
.mobile-field + .mobile-field { margin-top: 8px; }
.mobile-field:focus { border-color: var(--ios-accent); box-shadow: 0 0 0 3px rgba(117,102,244,.14); }
.mobile-start-actions { margin-top: 8px; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
.mobile-start-actions .mobile-field { margin: 0; }
.mobile-primary-button { min-height: 43px; border: 0; border-radius: 8px; color: #fff; background: var(--ios-accent); box-shadow: inset 0 -3px rgba(41,35,91,.18); font-size: 11px; }
.mobile-active-session { width: 100%; min-height: 102px; margin-top: 12px; border: 0; border-radius: 8px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: end; color: #f5f4f1; text-align: left; background: #2b2d3a; }
.mobile-active-session span { color: #afa7d4; font-size: 8px; }
.mobile-active-session strong { grid-row: 1 / 3; grid-column: 2; color: #f0cf74; font: 800 24px var(--font-pixel-mono); }
.mobile-active-session small { margin-top: 8px; overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }

.mobile-section { margin-top: 14px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 14px; background: var(--ios-surface); }
.mobile-section > header { min-height: 30px; margin-bottom: 9px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mobile-section > header h2 { margin: 0; font-size: 14px; }
.mobile-section > header span { color: var(--ios-muted); font-size: 8px; }
.mobile-todo-row { min-height: 58px; display: grid; grid-template-columns: 27px minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-bottom: 1px solid #e1e3e7; }
.mobile-todo-row:last-child { border-bottom: 0; }
.mobile-todo-row label input { position: absolute; opacity: 0; }
.mobile-todo-row label span { width: 21px; height: 21px; border: 2px solid #b9bcc4; display: block; background: #fff; }
.mobile-todo-row strong, .mobile-todo-row small { display: block; }
.mobile-todo-row strong { overflow: hidden; text-overflow: ellipsis; font-size: 10px; white-space: nowrap; }
.mobile-todo-row small { margin-top: 5px; color: var(--ios-muted); font-size: 8px; }
.mobile-todo-row > button, .mobile-schedule-todo > button { width: 32px; height: 32px; border: 1px solid #d1cdf4; border-radius: 8px; color: var(--ios-accent); background: #f0eeff; }
.mobile-empty { margin: 12px 0; color: var(--ios-muted); font-size: 9px; text-align: center; }

/* Mobile focus uses no map. The effort layer and ritual are the only visuals. */
.mobile-focus-ready > header span, .mobile-page-title > span { color: var(--ios-accent); font-size: 9px; }
.mobile-focus-ready > header h1, .mobile-page-title h1 { margin: 7px 0 0; font-size: 22px; letter-spacing: 0; line-height: 1.25; }
.mobile-page-title p { margin: 7px 0 0; color: var(--ios-muted); font-size: 9px; }
.mobile-focus-idle { position: relative; min-height: 260px; margin-top: 14px; border-radius: 8px; display: grid; place-items: center; align-content: center; overflow: hidden; color: #f2f1ed; background: #252734; }
.mobile-focus-idle .default-pet { position: relative; z-index: 2; transform: scale(.92); }
.mobile-focus-idle > strong { position: relative; z-index: 3; margin-top: -12px; font-size: 12px; }
.mobile-focus-idle > small { position: relative; z-index: 3; margin-top: 4px; color: #aaa7b4; font-size: 8px; }
.mobile-idle-rune { position: absolute; width: 190px; height: 190px; border: 2px dotted rgba(240,207,116,.55); border-radius: 50%; }
.mobile-idle-rune::after { content: ""; position: absolute; inset: 38px; border: 2px solid rgba(136,122,227,.52); transform: rotate(45deg); }
.mobile-focus-ready .mobile-start-panel { margin-top: 14px; }
.mobile-focus-running { color: #f4f3ef; background: #1d1f2a; }
.mobile-focus-meta { text-align: center; }
.mobile-focus-meta > span { display: inline-block; border: 1px solid #4f4a6d; border-radius: 8px; padding: 6px 8px; color: #b9b0e9; font-size: 8px; }
.mobile-focus-meta h1 { max-width: 90%; margin: 10px auto 0; overflow: hidden; text-overflow: ellipsis; font-size: 16px; white-space: nowrap; }
.mobile-focus-meta small { display: block; margin-top: 6px; color: #9c9eaa; font-size: 8px; }
.mobile-focus-clock { margin-top: 17px; text-align: center; }
.mobile-focus-clock > span { color: #a8a9b3; font-size: 8px; }
.mobile-focus-clock > strong { display: block; margin-top: 5px; color: #f1d47d; font: 800 clamp(50px, 16vw, 74px) var(--font-pixel-mono); line-height: 1.05; }
.mobile-focus-line { width: 84%; height: 5px; margin: 11px auto 0; overflow: hidden; background: #363846; }
.mobile-focus-line i { display: block; height: 100%; background: #8b7cf0; }
.mobile-effort-stage { margin-top: 15px; border: 1px solid #414353; border-radius: 8px; overflow: hidden; background: #242632; }
.mobile-effort-role { min-height: 41px; padding: 9px 11px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #414353; }
.mobile-effort-role span { color: #a9abb6; font-size: 8px; }
.mobile-effort-role strong { color: #e6d17e; font-size: 10px; }
.mobile-effort-stage .role-action-layer { min-height: 226px; border: 0; grid-template-columns: 1fr; padding: 0; gap: 0; background: transparent; }
.mobile-effort-stage .role-action-media { min-height: 176px; aspect-ratio: 16 / 9; }
.mobile-effort-stage .role-action-media::after { border: 0; box-shadow: inset 0 -28px 28px rgba(13,14,21,.34); }
.mobile-effort-stage .role-action-scene { min-height: 176px; }
.mobile-effort-stage .role-action-copy { min-height: 50px; padding: 8px 11px; }
.mobile-effort-stage .role-action-copy strong { margin-top: 4px; font-size: 10px; }
.mobile-effort-stage .role-action-copy small { margin-top: 4px; }
.mobile-ritual-wrap { margin-top: 10px; }
.mobile-ritual-wrap .ritual-progress { min-height: 104px; border-color: #414353; grid-template-columns: 88px minmax(0, 1fr); padding: 6px 10px; gap: 9px; background: #242632; }
.mobile-ritual-wrap .ritual-diagram { width: 84px; }
.mobile-ritual-wrap .ritual-copy strong { color: #f5f3eb; font-size: 10px; }
.mobile-focus-actions { position: sticky; bottom: 0; margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mobile-focus-actions button { min-height: 45px; border: 1px solid #4b4d5a; border-radius: 8px; color: #f3f2ed; background: #30323e; }
.mobile-focus-actions button.is-danger { border-color: #754b4c; color: #ffc1b7; background: #3a292d; }
.mobile-focus-warning { margin: 9px 0 0; color: #e7bd74; font-size: 8px; text-align: center; }

/* Role, schedule and profile */
.mobile-role-picker { margin-top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.mobile-role-picker button { min-height: 79px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 6px; display: grid; justify-items: center; color: #626571; background: var(--ios-surface); }
.mobile-role-picker button.active { border-color: var(--ios-accent); color: var(--ios-accent); box-shadow: inset 0 -3px rgba(117,102,244,.12); }
.mobile-role-picker img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.mobile-role-picker span { font-size: 8px; }
.mobile-role-preview { margin-top: 10px; border: 1px solid var(--ios-line); border-radius: 8px; overflow: hidden; background: var(--ios-surface); }
.mobile-role-preview .role-tier-preview { min-height: 274px; border: 0; }
.mobile-role-preview .role-tier-preview.has-media > img, .mobile-role-preview .role-tier-preview.has-media video { height: 274px; }
.mobile-role-preview > div:last-child { padding: 12px 14px; }
.mobile-role-preview > div:last-child small, .mobile-role-preview > div:last-child strong { display: block; }
.mobile-role-preview > div:last-child small { color: var(--ios-accent); font-size: 8px; }
.mobile-role-preview > div:last-child strong { margin-top: 5px; font-size: 14px; }
.mobile-role-preview > div:last-child p { margin: 6px 0 0; color: var(--ios-muted); font-size: 9px; line-height: 1.6; }
.mobile-tier-list { display: grid; gap: 7px; }
.mobile-tier-row { min-height: 70px; border: 1px solid #d9dbe0; border-radius: 8px; padding: 5px 8px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 9px; text-align: left; background: #fff; }
.mobile-tier-row.active { border-color: var(--ios-accent); box-shadow: inset 3px 0 var(--ios-accent); }
.mobile-tier-row .growth-tier-art { width: 52px; height: 52px; transform: none; }
.mobile-tier-row .growth-tier-art > img { width: 60px; height: 58px; }
.mobile-tier-row > span small, .mobile-tier-row > span strong, .mobile-tier-row > span em { display: block; }
.mobile-tier-row > span small { color: var(--ios-accent); font-size: 7px; }
.mobile-tier-row > span strong { margin-top: 3px; font-size: 10px; }
.mobile-tier-row > span em { margin-top: 4px; color: var(--ios-muted); font-size: 7px; font-style: normal; }
.mobile-equipment-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mobile-equipment-avatar { grid-column: span 2; grid-row: span 2; min-height: 104px; border: 3px solid #686873; display: grid; place-items: center; background: #2b2d39; }
.mobile-equipment-avatar img { width: 98px; height: 98px; object-fit: contain; image-rendering: pixelated; }
.mobile-equipment-slot { position: relative; aspect-ratio: 1; border: 3px solid #676772; border-right-color: #c4c4ca; border-bottom-color: #c4c4ca; display: grid; place-items: center; background: #888892; }
.mobile-equipment-slot span { width: 20px; height: 20px; opacity: .25; border: 2px solid #4e4e58; transform: rotate(45deg); }
.mobile-equipment-slot.unlocked span { opacity: 1; border-color: #f0cd72; background: #6e5ad0; }
.mobile-equipment-slot.active { outline: 3px solid #f0cd72; outline-offset: -5px; }
.mobile-equipment-slot small { position: absolute; right: 3px; bottom: 1px; color: #fff; font: 700 7px var(--font-pixel-mono); text-shadow: 1px 1px #33343b; }

.mobile-day-strip { margin-top: 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mobile-day-strip button { min-height: 59px; border: 1px solid var(--ios-line); border-radius: 8px; display: grid; place-items: center; align-content: center; gap: 5px; color: #666975; background: var(--ios-surface); }
.mobile-day-strip button.active { border-color: var(--ios-accent); color: #fff; background: var(--ios-accent); }
.mobile-day-strip small { font-size: 7px; }
.mobile-day-strip strong { font: 800 14px var(--font-pixel-mono); }
.mobile-agenda-event { width: 100%; min-height: 65px; border: 0; border-left: 4px solid var(--event-color); padding: 6px 8px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 8px; text-align: left; background: #fff; }
.mobile-agenda-event + .mobile-agenda-event { margin-top: 7px; }
.mobile-agenda-event > span { color: #626570; font: 700 9px var(--font-pixel-mono); }
.mobile-agenda-event strong, .mobile-agenda-event small { display: block; }
.mobile-agenda-event strong { font-size: 10px; }
.mobile-agenda-event small { margin-top: 5px; color: var(--ios-muted); font-size: 8px; }
.mobile-agenda-event img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.mobile-event-detail { min-height: 62px; margin-top: 9px; border: 1px solid #d7d9df; border-left: 4px solid var(--event-color); padding: 8px; display: grid; grid-template-columns: 44px minmax(0, 1fr) 30px; align-items: center; gap: 8px; background: #f0f1f3; }
.mobile-event-detail > span { color: #60636e; font: 700 8px var(--font-pixel-mono); }
.mobile-event-detail strong, .mobile-event-detail small { display: block; }
.mobile-event-detail strong { font-size: 9px; }
.mobile-event-detail small { margin-top: 4px; color: var(--ios-muted); font-size: 7px; }
.mobile-event-detail button { width: 28px; height: 28px; border: 0; color: #8d4b45; background: #f3dcd8; }
.mobile-schedule-todo { min-height: 58px; display: grid; grid-template-columns: 41px minmax(0, 1fr) 34px; align-items: center; gap: 8px; border-bottom: 1px solid #e1e3e7; }
.mobile-schedule-todo:last-child { border-bottom: 0; }
.mobile-schedule-todo > span { width: 37px; height: 37px; display: grid; place-items: center; color: #fff; background: #555866; font: 700 8px var(--font-pixel-mono); }
.mobile-schedule-todo strong, .mobile-schedule-todo small { display: block; }
.mobile-schedule-todo strong { font-size: 9px; }
.mobile-schedule-todo small { margin-top: 4px; color: var(--ios-muted); font-size: 7px; }

.mobile-profile-tabs { margin-top: 15px; border: 1px solid #cfd2d8; border-radius: 8px; padding: 3px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: #dfe2e6; }
.mobile-profile-tabs button { min-height: 35px; border: 0; border-radius: 6px; color: #696c77; background: transparent; font-size: 9px; }
.mobile-profile-tabs button.active { color: #292b35; background: #fff; box-shadow: 0 2px 6px rgba(36,39,49,.10); }
.mobile-profile-stats { margin-top: 14px; display: grid; grid-template-columns: 1.15fr .85fr .85fr; border: 1px solid var(--ios-line); border-radius: 8px; overflow: hidden; background: var(--ios-surface); }
.mobile-profile-stats > div { min-height: 88px; padding: 13px 7px; display: grid; place-items: center; align-content: center; border-right: 1px solid var(--ios-line); }
.mobile-profile-stats > div:last-child { border-right: 0; }
.mobile-profile-stats strong { color: var(--ios-accent); font: 800 20px var(--font-pixel-mono); }
.mobile-profile-stats span { margin-top: 7px; color: var(--ios-muted); font-size: 7px; }
.mobile-record-list { margin-top: 12px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 4px 12px; background: var(--ios-surface); }
.mobile-record-list article { min-height: 63px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #e1e3e7; }
.mobile-record-list article:last-child { border-bottom: 0; }
.mobile-record-mark { width: 8px; height: 28px; background: var(--ios-accent); }
.mobile-record-mark.task-reading { background: #d2a547; }
.mobile-record-mark.task-design { background: #d96e5b; }
.mobile-record-mark.task-research { background: #8577cf; }
.mobile-record-list strong, .mobile-record-list small { display: block; }
.mobile-record-list strong { font-size: 9px; }
.mobile-record-list small { margin-top: 5px; color: var(--ios-muted); font-size: 7px; }
.mobile-record-list b { font: 800 10px var(--font-pixel-mono); }
.mobile-badge-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mobile-badge-grid article { min-height: 154px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 14px 8px; display: grid; justify-items: center; align-content: center; background: var(--ios-surface); }
.mobile-badge-grid article > div { width: 70px; height: 70px; border: 5px double #534d65; display: grid; place-items: center; background: #7566f4; clip-path: polygon(50% 0,90% 20%,100% 62%,75% 100%,25% 100%,0 62%,10% 20%); }
.mobile-badge-grid article > div span { color: #fff; font: 800 16px var(--font-pixel-mono); }
.mobile-badge-grid article > strong { margin-top: 9px; font-size: 9px; }
.mobile-badge-grid article > small { margin-top: 5px; color: var(--ios-muted); font-size: 7px; }
.mobile-badge-grid article.locked { filter: grayscale(1); opacity: .52; }
.mobile-setting-list { margin-top: 14px; border: 1px solid var(--ios-line); border-radius: 8px; padding: 0 13px; background: var(--ios-surface); }
.mobile-setting-list .setting-row { min-height: 64px; gap: 12px; }
.mobile-setting-list .setting-copy strong { font-size: 10px; }
.mobile-setting-list .setting-copy span { font-size: 8px; }
.mobile-reset-button { width: 100%; min-height: 45px; margin-top: 12px; border: 1px solid #e0b5ae; border-radius: 8px; color: #a8463d; background: #fff1ee; font-size: 10px; }

/* Lightweight system apps */
.ios-system-app { position: absolute; inset: 0; overflow: hidden; background: #f1f2f4; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.ios-system-app > header:not(.ios-status-bar) { position: absolute; z-index: 18; top: calc(52px + env(safe-area-inset-top)); left: 0; right: 0; min-height: 68px; padding: 8px 17px; display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid #d8dae0; background: rgba(247,248,249,.95); }
.ios-system-app > header:not(.ios-status-bar) button { width: 34px; height: 40px; border: 0; color: #2475d0; background: transparent; font-size: 30px; }
.ios-system-app > header:not(.ios-status-bar) span { color: #7a7d87; font-size: 11px; }
.ios-system-app > header:not(.ios-status-bar) h1 { margin: 2px 0 0; font-size: 22px; }
.ios-system-app > header:not(.ios-status-bar) > strong { color: #e35e57; font-size: 12px; }
.ios-system-app > main { position: absolute; top: calc(120px + env(safe-area-inset-top)); left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; padding: 18px; }
.ios-system-app main section { margin-top: 24px; }
.ios-system-app main h2 { margin: 0 0 11px; font-size: 17px; }
.ios-system-date { display: grid; grid-template-columns: 56px 1fr; align-items: center; }
.ios-system-date span { color: #e35e57; font-size: 12px; }
.ios-system-date strong { grid-row: 2; color: #e35e57; font-size: 44px; font-weight: 400; }
.ios-system-date small { grid-column: 2; grid-row: 1 / 3; color: #777a84; font-size: 12px; }
.ios-system-row { min-height: 67px; display: grid; grid-template-columns: 50px minmax(0, 1fr) 48px; align-items: center; gap: 9px; border-bottom: 1px solid #dfe1e5; }
.ios-system-row time { color: #696c76; font-size: 11px; }
.ios-system-row > span { border-left: 4px solid var(--system-accent); padding-left: 9px; }
.ios-system-row strong, .ios-system-row small { display: block; }
.ios-system-row strong { font-size: 13px; }
.ios-system-row small { margin-top: 4px; color: #80838c; font-size: 10px; }
.ios-system-row img { width: 46px; height: 46px; object-fit: contain; image-rendering: pixelated; }
.ios-system-todo { min-height: 55px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid #dfe1e5; }
.ios-system-todo > span { width: 16px; height: 16px; border: 2px solid #a5a8af; border-radius: 50%; }
.ios-system-todo strong, .ios-system-todo small { display: block; }
.ios-system-todo strong { font-size: 12px; }
.ios-system-todo small { margin-top: 4px; color: #81848d; font-size: 10px; }
.ios-settings-hero { min-height: 72px; border-radius: 12px; padding: 12px; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 11px; background: #fff; }
.ios-settings-hero .ios-focus-moon { width: 42px; height: 42px; display: grid; place-items: center; }
.ios-settings-hero strong, .ios-settings-hero small { display: block; }
.ios-settings-hero strong { font-size: 14px; }
.ios-settings-hero small { margin-top: 4px; color: #7c7f88; font-size: 10px; }
.ios-settings-group { margin-top: 18px; border-radius: 12px; padding: 0 13px; background: #fff; }
.ios-settings-group article { min-height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e1e2e5; }
.ios-settings-group article:last-child { border-bottom: 0; }
.ios-settings-group span { font-size: 13px; }
.ios-settings-group strong { color: #777a83; font-size: 12px; font-weight: 400; }

/* Mobile system-app easter eggs */
.ios-notes-easter-app { background: #f5f2e7; }
.ios-notes-easter-app > main { padding: 18px 20px 30px; }
.mobile-note-date { color: #969184; font-size: 9px; text-align: center; }
.mobile-note-paper { min-height: 292px; margin-top: 15px; padding: 18px 15px; overflow: hidden; border: 1px solid #d8d1bc; color: #36332e; background: repeating-linear-gradient(#fffdf5 0 31px, #ddd6c3 32px); box-shadow: 4px 5px 0 rgba(91,79,52,.08); transform-origin: 78% 86%; }
.mobile-note-paper h2 { margin: 0 0 15px; font: 800 18px var(--font-pixel); }
.mobile-note-paper p, .mobile-note-paper li { font-size: 11px; line-height: 2.9; }
.mobile-note-paper p { margin: 0; }
.mobile-note-paper ul { margin: 0; padding-left: 21px; }
.mobile-note-paper.is-eating { animation: mobileNotesEat 2.1s steps(12, end) forwards; }
.mobile-note-paper.is-eaten:not(.is-eating) { visibility: hidden; min-height: 130px; }
.mobile-notes-pet { width: 100%; min-height: 96px; margin-top: 13px; border: 2px dashed #c3aa68; padding: 4px 12px; display: grid; grid-template-columns: 84px minmax(0, 1fr); place-items: center; color: #69542a; background: #fff4c7; text-align: left; }
.mobile-notes-pet .pet-video-slot, .mobile-notes-pet .pixel-pet { width: 80px; height: 80px; min-height: 0; margin: 0; background: transparent; }
.mobile-notes-pet .keyed-video-canvas { object-fit: contain; transform: scale(1.08); }
.mobile-notes-pet .pixel-pet img { width: 70px; height: 76px; }
.mobile-notes-pet > span { font: 800 10px var(--font-pixel); line-height: 1.6; }
.mobile-note-empty { margin-top: 10px; color: #867d69; text-align: center; }
.mobile-note-empty strong, .mobile-note-empty span { display: block; }
.mobile-note-empty strong { color: #3e392f; font-size: 14px; }
.mobile-note-empty span { margin-top: 5px; font-size: 9px; }

.ios-safari-easter-app { background: #fbfbfd; }
.ios-safari-easter-app > main { padding-top: 23px; }
.mobile-baidu-paw { position: relative; width: 140px; height: 112px; margin: 0 auto; color: #315efb; }
.mobile-baidu-paw > i { position: absolute; width: 15px; height: 22px; border: 3px solid #203aa2; background: #6282ff; box-shadow: inset 3px 3px #a9b9ff; transform: rotate(-12deg); }
.mobile-baidu-paw > i:nth-child(1) { left: 27px; top: 7px; }
.mobile-baidu-paw > i:nth-child(2) { left: 50px; top: 0; transform: rotate(-3deg); }
.mobile-baidu-paw > i:nth-child(3) { left: 73px; top: 3px; transform: rotate(7deg); }
.mobile-baidu-paw > i:nth-child(4) { left: 95px; top: 12px; transform: rotate(15deg); }
.mobile-baidu-paw > b { position: absolute; left: 47px; top: 28px; width: 53px; height: 38px; border: 4px solid #203aa2; background: #4f72f5; clip-path: polygon(20% 0,80% 0,100% 34%,100% 78%,82% 100%,18% 100%,0 78%,0 34%); box-shadow: inset 6px 5px #7892ff; }
.mobile-baidu-paw > strong, .mobile-baidu-paw > small { position: absolute; left: 50%; width: 190px; text-align: center; transform: translateX(-50%); }
.mobile-baidu-paw > strong { top: 74px; color: #243b9a; font: 800 11px var(--font-pixel); }
.mobile-baidu-paw > small { top: 94px; color: #747991; font: 700 8px var(--font-pixel); }
.mobile-baidu-search { position: relative; width: 100%; min-height: 47px; border: 2px solid #315efb; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) 82px; align-items: stretch; color: #898c97; background: #fff; text-align: left; }
.mobile-baidu-search > span:first-child { min-width: 0; padding: 0 10px; display: flex; align-items: center; overflow: hidden; font-size: 10px; white-space: nowrap; }
.mobile-baidu-search > b { display: grid; place-items: center; color: #fff; background: #315efb; font-size: 10px; }
.mobile-baidu-search.is-patrolling { box-shadow: 4px 4px 0 #bfd0ff; }
.mobile-search-pet { position: absolute; z-index: 4; left: 0; bottom: 31px; width: 74px; height: 72px; display: block; font-style: normal; animation: mobileSafariPatrol 3s steps(14, end) infinite alternate; }
.mobile-search-pet .pet-video-slot, .mobile-search-pet .pixel-pet { width: 74px; height: 72px; min-height: 0; margin: 0; background: transparent; }
.mobile-search-pet .keyed-video-canvas { object-fit: contain; }
.mobile-search-pet .pixel-pet img { width: 64px; height: 68px; }
.mobile-safari-patrol-copy { min-height: 54px; padding: 11px 3px; }
.mobile-safari-patrol-copy strong, .mobile-safari-patrol-copy span { display: block; }
.mobile-safari-patrol-copy strong { color: #333642; font-size: 10px; }
.mobile-safari-patrol-copy span { margin-top: 5px; color: #858893; font-size: 9px; }
.mobile-bookmarks { margin-top: 9px !important; border-top: 1px solid #dadde4; }
.mobile-bookmarks > header { min-height: 49px; display: flex; align-items: center; justify-content: space-between; }
.mobile-bookmarks > header h2 { margin: 0; font-size: 15px; }
.mobile-bookmarks > header span { color: #858892; font-size: 9px; }
.mobile-bookmarks article { min-height: 61px; display: grid; grid-template-columns: 35px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid #e2e4e9; }
.mobile-bookmarks article > b { color: #315efb; font: 800 9px var(--font-pixel-mono); }
.mobile-bookmarks article strong, .mobile-bookmarks article small { display: block; }
.mobile-bookmarks article strong { font-size: 11px; }
.mobile-bookmarks article small { margin-top: 5px; color: #8b8e98; font-size: 9px; }

.ios-ruflow-easter-app { background: #f4f6f8; }
.ios-ruflow-easter-app > main { padding: 0 13px 24px; }
.mobile-ruflow-hero { min-height: 108px; margin: 0 -13px !important; padding: 16px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 12px; border-bottom: 1px solid #dce1e6; background: #fff; }
.mobile-ruflow-hero .ios-ruflow-icon { position: relative; width: 54px; height: 54px; display: block; border-radius: 13px; }
.mobile-ruflow-hero small { color: #2b8fdf; font: 800 7px var(--font-pixel-mono); }
.mobile-ruflow-hero h2 { margin: 5px 0 0; font-size: 16px; }
.mobile-ruflow-hero p { margin: 5px 0 0; color: #6f7580; font-size: 9px; }
.mobile-ruflow-list { border: 1px solid #dce1e6; background: #fff; }
.mobile-ruflow-person { min-height: 62px; padding: 7px 8px; display: grid; grid-template-columns: 43px minmax(0, 1fr) minmax(86px, 1.2fr); align-items: center; gap: 8px; border-bottom: 1px solid #e5e8eb; }
.mobile-ruflow-person:last-child { border-bottom: 0; }
.mobile-ruflow-avatar { position: relative; width: 39px; height: 39px; overflow: hidden; border: 2px solid #3d4855; background: var(--avatar-bg); box-shadow: 3px 3px 0 rgba(43,54,67,.1); }
.mobile-ruflow-avatar::before { content: ""; position: absolute; left: 9px; top: 7px; width: 17px; height: 17px; border: 2px solid #3d4855; background: #efc7a5; }
.mobile-ruflow-avatar::after { content: ""; position: absolute; left: 5px; bottom: -4px; width: 27px; height: 18px; border: 2px solid #3d4855; background: var(--avatar-accent); }
.mobile-ruflow-avatar i { position: absolute; z-index: 2; left: 7px; top: 4px; width: 22px; height: 9px; border: 2px solid #3d4855; background: var(--avatar-accent); }
.mobile-ruflow-person > span:nth-child(2) strong, .mobile-ruflow-person > span:nth-child(2) small { display: block; }
.mobile-ruflow-person > span:nth-child(2) strong { font-size: 11px; }
.mobile-ruflow-person > span:nth-child(2) small { margin-top: 4px; color: #979ba3; font: 700 7px var(--font-pixel-mono); }
.mobile-ruflow-person > b { color: #60656e; font-size: 9px; font-weight: 500; line-height: 1.45; }

.ios-camera-easter-app { color: #f5f5f2; background: #0c0d12; }
.ios-camera-easter-app > header:not(.ios-status-bar) { border-bottom-color: #292b32; color: #fff; background: rgba(12,13,18,.94); }
.ios-camera-easter-app > header:not(.ios-status-bar) button, .ios-camera-easter-app > header:not(.ios-status-bar) span, .ios-camera-easter-app > header:not(.ios-status-bar) > strong { color: #f5f5f2; }
.ios-camera-easter-app > main { bottom: 0; padding: 0 0 calc(18px + env(safe-area-inset-bottom)); overflow: hidden; background: #0c0d12; }
.mobile-camera-viewfinder { position: relative; height: min(55dvh, 470px); overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #39424a 0 5%, #232932 35%, #12151c 72%); }
.mobile-camera-viewfinder::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 70px rgba(0,0,0,.68); pointer-events: none; }
.mobile-camera-rec { position: absolute; z-index: 5; left: 14px; top: 14px; font: 800 9px var(--font-pixel-mono); }
.mobile-camera-rec i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; background: #ef5953; animation: mobileCameraRec 1s steps(2, end) infinite; }
.mobile-camera-focus-box { position: absolute; z-index: 4; width: 132px; height: 132px; border: 2px solid #f2ce61; }
.mobile-camera-focus-box::before, .mobile-camera-focus-box::after { content: ""; position: absolute; background: #f2ce61; }
.mobile-camera-focus-box::before { left: 50%; top: -7px; width: 2px; height: 14px; }
.mobile-camera-focus-box::after { top: 50%; left: -7px; width: 14px; height: 2px; }
.mobile-camera-subject { position: relative; z-index: 3; width: 230px; height: 260px; display: grid; place-items: center; align-content: center; }
.mobile-camera-subject .pet-video-slot, .mobile-camera-subject .pixel-pet { width: 230px; height: 230px; min-height: 0; margin: 0; background: transparent; }
.mobile-camera-subject .keyed-video-canvas { object-fit: contain; transform: scale(1.04); }
.mobile-camera-subject .pixel-pet img { width: 190px; height: 220px; }
.mobile-camera-subject > strong { margin-top: -28px; color: #fff1bd; font: 800 10px var(--font-pixel); text-shadow: 2px 2px #14151c; }
.mobile-camera-grid { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.mobile-camera-grid i { position: absolute; background: rgba(255,255,255,.17); }
.mobile-camera-grid i:nth-child(1), .mobile-camera-grid i:nth-child(2) { top: 0; bottom: 0; width: 1px; }
.mobile-camera-grid i:nth-child(1) { left: 33%; }.mobile-camera-grid i:nth-child(2) { right: 33%; }
.mobile-camera-grid i:nth-child(3), .mobile-camera-grid i:nth-child(4) { left: 0; right: 0; height: 1px; }
.mobile-camera-grid i:nth-child(3) { top: 33%; }.mobile-camera-grid i:nth-child(4) { bottom: 33%; }
.mobile-camera-modes { height: 40px; display: flex; align-items: center; justify-content: center; gap: 27px; color: #8f9199; font-size: 9px; }
.mobile-camera-modes strong { color: #f2ce61; font-size: 10px; }
.mobile-camera-shutter { width: 65px; height: 65px; margin: 2px auto 0; border: 3px solid #f7f7f5; border-radius: 50%; padding: 4px; display: block; background: transparent; }
.mobile-camera-shutter i { width: 100%; height: 100%; border-radius: 50%; display: block; background: #f7f7f5; }
.mobile-camera-caption { display: block; margin-top: 9px; color: #9698a0; font-size: 8px; text-align: center; }

.ios-phone-easter-app { background: #f4f5f7; }
.ios-phone-easter-app > main { padding: 15px 15px 66px; }
.mobile-phone-contact { min-height: 104px; margin: 0 !important; border-radius: 14px; padding: 13px; display: grid; grid-template-columns: 62px minmax(0, 1fr) 42px; align-items: center; gap: 11px; background: #fff; box-shadow: 0 5px 16px rgba(30,34,43,.06); }
.mobile-phone-contact > span { width: 58px; height: 58px; border: 3px solid #712e2c; display: grid; place-items: center; color: #fff0bd; background: #d95248; box-shadow: inset 5px 5px #ef8a75; font: 800 20px var(--font-pixel); }
.mobile-phone-contact small { color: #42a65f; font-size: 8px; }
.mobile-phone-contact h2 { margin: 5px 0 0; font-size: 15px; }
.mobile-phone-contact p { margin: 4px 0 0; color: #858892; font-size: 9px; }
.mobile-phone-contact > button { width: 39px; height: 39px; border: 0; border-radius: 50%; color: #fff; background: #42b35f; }
.mobile-call-list { margin-top: 13px; border-radius: 12px; padding: 0 12px; background: #fff; }
.mobile-call-row { min-height: 67px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 27px; align-items: center; gap: 8px; border-bottom: 1px solid #e3e4e7; }
.mobile-call-row:last-child { border-bottom: 0; }
.mobile-call-avatar { width: 35px; height: 35px; display: grid; place-items: center; color: #fff0bd; background: #d95248; font: 800 11px var(--font-pixel); }
.mobile-call-row strong, .mobile-call-row small { display: block; }
.mobile-call-row strong { font-size: 11px; }
.mobile-call-row small { margin-top: 4px; color: #8a8d95; font-size: 8px; }
.mobile-call-row.is-missed strong { color: #db5049; }
.mobile-call-row time { color: #8b8e97; font-size: 8px; }
.mobile-call-row button { width: 25px; height: 25px; border: 1px solid #3c8bd4; border-radius: 50%; color: #3285d1; background: transparent; font: 700 11px serif; }
.mobile-phone-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 54px; display: grid; grid-template-columns: repeat(3,1fr); place-items: center; border-top: 1px solid #d9dbe0; color: #8a8d95; background: rgba(248,249,250,.95); font-size: 8px; }
.mobile-phone-tabs .active { color: #399852; font-weight: 700; }

.ios-photos-easter-app { background: #f7f8fa; }
.ios-photos-easter-app > main { padding: 0 0 72px; }
.mobile-photo-tabs { position: sticky; z-index: 4; top: 0; height: 43px; padding: 5px 12px; display: grid; grid-template-columns: repeat(4,1fr); gap: 3px; background: rgba(247,248,250,.95); }
.mobile-photo-tabs span, .mobile-photo-tabs strong { display: grid; place-items: center; border-radius: 7px; color: #8b8e97; font-size: 9px; }
.mobile-photo-tabs strong { color: #292c35; background: #e2e4e8; }
.mobile-photo-heading { min-height: 76px; margin: 0 !important; padding: 13px 16px 9px; display: flex; align-items: end; justify-content: space-between; }
.mobile-photo-heading small { color: #7d808a; font-size: 9px; }
.mobile-photo-heading h2 { margin: 5px 0 0; font-size: 19px; }
.mobile-photo-heading > span { color: #7d808a; font-size: 9px; }
.mobile-tomato-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px; background: #e5e6e9; }
.mobile-tomato-photo { position: relative; aspect-ratio: 1; min-width: 0; border: 0; padding: 0; overflow: hidden; background: #222530; }
.mobile-tomato-photo img { width: 100%; height: 100%; display: block; object-fit: cover; image-rendering: pixelated; }
.mobile-tomato-photo.photo-1 img, .mobile-tomato-photo.photo-4 img { object-fit: contain; background: #222530; }
.mobile-tomato-photo span { position: absolute; left: 5px; bottom: 4px; color: #fff; font: 700 7px var(--font-pixel-mono); text-shadow: 1px 1px 2px #000; }
.mobile-photo-memory { min-height: 122px; margin: 16px 14px 0 !important; border: 1px solid #d9dbe0; padding: 9px; display: grid; grid-template-columns: 96px minmax(0,1fr); align-items: center; gap: 11px; background: #fff; }
.mobile-photo-memory > div { width: 92px; height: 98px; overflow: hidden; display: grid; place-items: center; background: #242632; }
.mobile-photo-memory .pet-video-slot, .mobile-photo-memory .pixel-pet { width: 96px; height: 96px; min-height: 0; margin: 0; background: transparent; }
.mobile-photo-memory .keyed-video-canvas { object-fit: contain; }
.mobile-photo-memory small, .mobile-photo-memory strong { display: block; }
.mobile-photo-memory small { color: #7566f4; font-size: 8px; }
.mobile-photo-memory strong { margin-top: 5px; font-size: 11px; }
.mobile-photo-memory p { margin: 6px 0 0; color: #858893; font-size: 8px; line-height: 1.5; }

.ios-clock-easter-app { color: #f5f5f2; background: #111218; }
.ios-clock-easter-app > header:not(.ios-status-bar) { border-bottom-color: #292a31; color: #fff; background: rgba(17,18,24,.96); }
.ios-clock-easter-app > header:not(.ios-status-bar) button, .ios-clock-easter-app > header:not(.ios-status-bar) span { color: #f0a33d; }
.ios-clock-easter-app > header:not(.ios-status-bar) > strong { color: #f0a33d; }
.ios-clock-easter-app > main { padding: 14px 16px 68px; background: #111218; }
.mobile-next-alarm { min-height: 74px; margin: 0 !important; border-bottom: 1px solid #32333a; display: grid; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 11px; }
.mobile-bed-icon { position: relative; width: 42px; height: 24px; border: 3px solid #f0a33d; border-top: 0; }
.mobile-bed-icon::before { content: ""; position: absolute; left: 3px; top: -12px; width: 13px; height: 11px; border-radius: 8px 8px 0 0; background: #f0a33d; }
.mobile-bed-icon::after { content: ""; position: absolute; left: 18px; right: 2px; top: -7px; height: 7px; background: #f0a33d; }
.mobile-next-alarm small, .mobile-next-alarm strong { display: block; }
.mobile-next-alarm small { color: #a4a5ab; font-size: 9px; }
.mobile-next-alarm strong { margin-top: 5px; font-size: 12px; }
.mobile-alarm-list { border-top: 1px solid #32333a; }
.mobile-alarm-row { min-height: 83px; display: grid; grid-template-columns: minmax(0,1fr) 52px; align-items: center; border-bottom: 1px solid #32333a; }
.mobile-alarm-row strong, .mobile-alarm-row span, .mobile-alarm-row small { display: block; }
.mobile-alarm-row strong { font-size: 34px; font-weight: 300; letter-spacing: 0; }
.mobile-alarm-row span { margin-top: 1px; color: #dadade; font-size: 9px; }
.mobile-alarm-row small { margin-top: 3px; color: #85868d; font-size: 8px; }
.mobile-alarm-switch { position: relative; width: 49px; height: 29px; border: 0; border-radius: 18px; background: #3f4149; }
.mobile-alarm-switch i { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: transform .2s; }
.mobile-alarm-switch.is-on { background: #ef9f36; }
.mobile-alarm-switch.is-on i { transform: translateX(20px); }
.mobile-clock-tabs { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 57px; display: grid; grid-template-columns: repeat(4,1fr); place-items: center; border-top: 1px solid #303139; color: #898a91; background: rgba(22,23,29,.97); font-size: 8px; }
.mobile-clock-tabs strong { color: #ef9f36; }

.ios-messages-easter-app { background: #f3f4f6; }
.ios-messages-easter-app > main { padding: 11px 13px 30px; }
.mobile-message-search { height: 38px; border-radius: 10px; padding: 0 12px; display: flex; align-items: center; gap: 8px; color: #8c8f97; background: #e2e4e8; font-size: 11px; }
.mobile-message-search i { position: relative; width: 12px; height: 12px; border: 2px solid currentColor; border-radius: 50%; }
.mobile-message-search i::after { content: ""; position: absolute; width: 6px; height: 2px; background: currentColor; transform: translate(9px,10px) rotate(45deg); }
.mobile-message-featured { min-height: 104px; margin: 13px 0 !important; border: 1px solid #dce0e4; padding: 12px; display: grid; grid-template-columns: 61px minmax(0,1fr); align-items: center; gap: 11px; background: #fff; }
.mobile-message-featured > span { width: 58px; height: 58px; border: 3px solid #712e2c; display: grid; place-items: center; color: #fff0bd; background: #d95248; box-shadow: inset 5px 5px #ef8a75; font: 800 20px var(--font-pixel); }
.mobile-message-featured small { color: #45a864; font-size: 8px; }
.mobile-message-featured strong { display: block; margin-top: 4px; font-size: 13px; }
.mobile-message-featured p { margin: 5px 0 0; color: #70737d; font-size: 9px; line-height: 1.4; }
.mobile-message-list { border-radius: 12px; padding: 0 10px; background: #fff; }
.mobile-message-row { position: relative; width: 100%; min-height: 73px; border: 0; border-bottom: 1px solid #e4e5e8; padding: 7px 0; display: grid; grid-template-columns: 47px minmax(0,1fr) auto; align-items: center; gap: 9px; color: #292b34; background: transparent; text-align: left; }
.mobile-message-row:last-child { border-bottom: 0; }
.mobile-message-avatar { width: 43px; height: 43px; display: grid; place-items: center; color: #fff; background: #d95248; font: 800 12px var(--font-pixel); }
.mobile-message-avatar.avatar-2 { background: #7566f4; }.mobile-message-avatar.avatar-3 { background: #bd8b3e; }.mobile-message-avatar.avatar-4 { background: #df793e; }.mobile-message-avatar.avatar-5 { background: #626773; }
.mobile-message-row strong { display: block; font-size: 11px; }
.mobile-message-row p { margin: 5px 0 0; overflow: hidden; color: #858892; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mobile-message-row time { align-self: start; padding-top: 8px; color: #9a9ca4; font-size: 8px; }
.mobile-message-row > b { position: absolute; right: 1px; bottom: 10px; min-width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: #3cab5b; font-size: 8px; }
.mobile-message-row.is-unread strong { font-weight: 800; }

.ios-placeholder-app main { display: grid; justify-items: center; align-content: center; text-align: center; }
.ios-placeholder-icon { width: 88px; height: 88px; border-radius: 22px; display: grid; place-items: center; background: #dfe2e7; }
.ios-placeholder-icon i { width: 38px; height: 38px; border: 4px solid #8a8e99; border-radius: 50%; }
.ios-placeholder-app h2 { margin: 18px 0 0; font-size: 20px; }
.ios-placeholder-app p { max-width: 240px; margin: 9px 0 0; color: #777a84; font-size: 13px; line-height: 1.5; }

/* Existing overlays are narrowed and lifted above the mobile tab bar. */
.mobile-experience .toast { z-index: 130; left: 14px; right: 14px; bottom: calc(92px + env(safe-area-inset-bottom)); width: auto; max-width: none; font-size: 10px; }
.mobile-experience .encounter-toast { right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); width: min(286px, calc(100% - 24px)); }
.mobile-experience .companion-encounter-toast { right: 12px; bottom: calc(92px + env(safe-area-inset-bottom)); width: min(300px, calc(100% - 24px)); }
.mobile-experience .completion-overlay { padding: calc(60px + env(safe-area-inset-top)) 12px calc(30px + env(safe-area-inset-bottom)); }
.mobile-experience .completion-card { width: 100%; max-height: calc(100dvh - 100px); overflow-y: auto; padding: 18px; }
.mobile-experience .completion-cinematic-stage { width: 100%; min-height: 520px; }
.mobile-experience .classroom-overlay { padding: calc(54px + env(safe-area-inset-top)) 10px calc(24px + env(safe-area-inset-bottom)); }
.mobile-experience .classroom-stage { width: 100%; min-height: 540px; }
.mobile-experience .role-level-up-overlay { z-index: 125; }

@media (max-height: 700px) {
  .ios-tomato-widget { min-height: 132px; }
  .ios-widget-pet { height: 96px; }
  .ios-widget-pet > img { width: 92px; height: 92px; }
  .ios-widget-pet .pet-video-slot, .ios-widget-pet .pixel-pet { width: 96px; height: 96px; }
  .ios-app-grid { margin-top: 16px; gap-block: 13px; }
  .ios-app > span { width: 50px; height: 50px; }
  .ios-app-tomato img { width: 50px; height: 50px; }
  .ios-home-dock { height: 68px; }
  .ios-dock-app { width: 49px; height: 49px; }
  .ios-lock-widgets { margin-top: 23px; }
}

@media (prefers-reduced-motion: no-preference) {
  .ios-widget-rune { animation: mobileRuneTurn 10s steps(16, end) infinite; }
  .mobile-idle-rune { animation: mobileRuneTurn 14s steps(20, end) infinite; }
  .ios-live-activity { animation: mobileIslandOpen .26s cubic-bezier(.2,.8,.2,1) both; }
  .mobile-app-shell, .ios-system-app { animation: mobileAppOpen .24s cubic-bezier(.2,.8,.2,1) both; }
  .ios-lock-screen { animation: mobileSurfaceIn .2s ease-out both; }
}

@keyframes mobileRuneTurn { to { transform: rotate(360deg); } }
@keyframes mobileIslandOpen { from { opacity: 0; transform: scale(.82) translateY(-7px); } to { opacity: 1; transform: none; } }
@keyframes mobileAppOpen { from { opacity: .4; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes mobileSurfaceIn { from { opacity: .25; } to { opacity: 1; } }
@keyframes mobileNotesEat { 0% { opacity: 1; transform: none; filter: none; } 35% { transform: translate(4px,-2px) rotate(1deg); filter: contrast(1.15); } 70% { opacity: .72; transform: translate(20px,26px) scale(.72) rotate(7deg); } 100% { opacity: 0; transform: translate(84px,90px) scale(.12) rotate(18deg); } }
@keyframes mobileSafariPatrol { from { transform: translateX(0); } to { transform: translateX(min(245px, calc(100vw - 126px))); } }
@keyframes mobileCameraRec { 50% { opacity: .22; } }

@media (prefers-reduced-motion: reduce) {
  .mobile-ios-root *, .mobile-ios-root *::before, .mobile-ios-root *::after { animation: none !important; transition: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .ios-tomato-widget, .ios-home-dock, .ios-assistive-menu, .ios-lock-widget, .ios-lock-focus, .mobile-app-header, .mobile-tab-bar { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ios-tomato-widget, .ios-assistive-menu { background: #252734; }
  .ios-home-dock { background: #b8bdc4; }
  .mobile-app-header, .mobile-tab-bar { background: #f7f8f9; }
}
