:root {
  color-scheme: dark;
  --bg-0: #0c0915;
  --bg-1: #21123f;
  --bg-2: #5d2976;
  --bg-3: #ff865f;
  --white: #ffffff;
  --shell-0: #fdfdfd;
  --shell-1: #eceef2;
  --shell-2: #dfe2e8;
  --shell-stroke: rgba(180, 186, 199, 0.88);
  --screen-padding: 1.15rem;
  --glass: rgba(255, 255, 255, 0.14);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --hairline: rgba(255, 255, 255, 0.12);
  --shadow-lg: 0 2rem 5rem rgba(5, 3, 12, 0.55);
  --shadow-md: 0 1.15rem 2rem rgba(8, 6, 18, 0.24);
  --text-dark: #131722;
  --text-muted: rgba(19, 23, 34, 0.64);
  --ios-blue: #167efb;
  --progress: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 141, 184, 0.34), transparent 26%),
    radial-gradient(circle at 82% 22%, rgba(135, 137, 255, 0.28), transparent 28%),
    linear-gradient(180deg, var(--bg-0), #140b26 30%, #2b1246 62%, #41245d 76%, #2b153d 100%);
  color: var(--white);
  overflow: hidden;
}

body {
  position: relative;
}

button,
input {
  font: inherit;
}

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

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.9;
  pointer-events: none;
}

.ambient-a {
  top: -8rem;
  left: -5rem;
  width: 22rem;
  height: 22rem;
  background: rgba(255, 111, 147, 0.26);
}

.ambient-b {
  top: 12%;
  right: -4rem;
  width: 18rem;
  height: 18rem;
  background: rgba(84, 107, 255, 0.28);
}

.ambient-c {
  bottom: -7rem;
  left: 50%;
  width: 24rem;
  height: 24rem;
  transform: translateX(-50%);
  background: rgba(255, 146, 92, 0.22);
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: min(2vh, 1rem) 1rem;
}

.phone-shell {
  position: relative;
  width: min(92vw, calc(95vh * 393 / 852), 26rem);
  aspect-ratio: 393 / 852;
  display: grid;
  place-items: center;
}

.phone-side-buttons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.phone-button {
  position: absolute;
  width: 0.34rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #d7dce5, #aab0bc);
  box-shadow:
    inset 0 0.04rem 0 rgba(255, 255, 255, 0.68),
    0 0.08rem 0.18rem rgba(72, 79, 94, 0.22);
}

.phone-button.left {
  left: -0.15rem;
}

.phone-button.left.top {
  top: 20%;
  height: 9%;
}

.phone-button.left.middle,
.phone-button.left.bottom {
  height: 6.3%;
}

.phone-button.left.middle {
  top: 34%;
}

.phone-button.left.bottom {
  top: 42%;
}

.phone-button.right {
  right: -0.15rem;
  top: 33%;
  height: 11.5%;
}

.phone-power-button {
  pointer-events: auto;
  border: 0;
  padding: 0;
  width: 1.8rem;
  right: -0.9rem;
  background: transparent;
  box-shadow: none;
  border-radius: 1rem;
}

.phone-power-button:hover {
  filter: brightness(0.98);
}

.phone-power-button:active {
  transform: translateX(1px);
}

.phone-power-button::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0.56rem;
  width: 0.34rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #d7dce5, #aab0bc);
  box-shadow:
    inset 0 0.04rem 0 rgba(255, 255, 255, 0.68),
    0 0.08rem 0.18rem rgba(72, 79, 94, 0.22);
}

.phone-shadow {
  position: absolute;
  inset: 5% 4% 1%;
  border-radius: 3.25rem;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(22px);
  transform: translateY(0.9rem) scale(0.975);
}

.phone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 3rem;
  padding: 0.52rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.3) 20%, transparent 35%),
    linear-gradient(155deg, var(--shell-0), var(--shell-1) 54%, var(--shell-2));
  border: 0.06rem solid var(--shell-stroke);
  box-shadow:
    inset 0 0.1rem 0.14rem rgba(255, 255, 255, 0.72),
    inset 0 -0.08rem 0.14rem rgba(173, 181, 195, 0.28),
    var(--shadow-lg);
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 0.18rem;
  border-radius: 2.84rem;
  border: 0.06rem solid rgba(255, 255, 255, 0.78);
  pointer-events: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2.5rem;
  overflow: hidden;
  isolation: isolate;
  clip-path: inset(0 round 2.5rem);
  background: #000;
  box-shadow:
    inset 0 0 0 0.08rem rgba(255, 255, 255, 0.08),
    0 0 0 0.08rem rgba(16, 19, 26, 0.7);
}

.status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: 4.6rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.95rem 1rem 0;
  pointer-events: none;
}

.status-time {
  display: inline-flex;
  align-items: center;
  min-width: 3.5rem;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 0.06rem 0.2rem rgba(0, 0, 0, 0.3);
}

.dynamic-island {
  position: absolute;
  left: 50%;
  top: 0.78rem;
  transform: translateX(-50%);
  width: 7.2rem;
  height: 1.65rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 70% 50%, rgba(36, 38, 49, 0.8), transparent 24%),
    #060709;
  box-shadow: inset 0 0.08rem 0.15rem rgba(255, 255, 255, 0.03);
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0;
}

.signal-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.12rem;
  height: 0.95rem;
}

.signal-bars i {
  width: 0.18rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
}

.signal-bars i:nth-child(1) {
  height: 0.35rem;
}

.signal-bars i:nth-child(2) {
  height: 0.5rem;
}

.signal-bars i:nth-child(3) {
  height: 0.7rem;
}

.signal-bars i:nth-child(4) {
  height: 0.9rem;
}

.wifi-icon {
  width: 0.95rem;
  height: 0.65rem;
  position: relative;
}

.wifi-icon::before,
.wifi-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  border-top: 0.12rem solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  transform: translateX(-50%);
}

.wifi-icon::before {
  top: 0.05rem;
  width: 0.95rem;
}

.wifi-icon::after {
  top: 0.32rem;
  width: 0.55rem;
}

.battery-icon {
  position: relative;
  width: 1.48rem;
  height: 0.84rem;
  border: 0.11rem solid rgba(255, 255, 255, 0.82);
  border-radius: 0.28rem;
}

.battery-icon::after {
  content: "";
  position: absolute;
  right: -0.22rem;
  top: 50%;
  width: 0.13rem;
  height: 0.34rem;
  transform: translateY(-50%);
  border-radius: 0 999px 999px 0;
  background: rgba(255, 255, 255, 0.88);
}

.battery-icon b {
  position: absolute;
  inset: 0.13rem;
  border-radius: 0.14rem;
  background: rgba(255, 255, 255, 0.96);
}

.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease;
  overflow: hidden;
  transform-origin: center bottom;
}

.screen.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.wallpaper,
.store-backdrop,
.game-backdrop {
  position: absolute;
  inset: 0;
}

.wallpaper-lock {
  background:
    linear-gradient(180deg, rgba(20, 18, 40, 0.14), rgba(20, 18, 40, 0.28)),
    url("./assets/lockscreen.jpg") center / cover no-repeat;
}

.wallpaper-home {
  background:
    linear-gradient(180deg, rgba(20, 18, 40, 0.12), rgba(20, 18, 40, 0.22)),
    url("./assets/home-wallpaper.jpg") center / cover no-repeat;
}

.store-backdrop {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 211, 224, 0.75), transparent 18%),
    radial-gradient(circle at 14% 74%, rgba(189, 210, 255, 0.55), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #fff5f7 40%, #eef1ff 100%);
}

.game-backdrop {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 226, 236, 0.28), transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 190, 136, 0.22), transparent 24%),
    linear-gradient(180deg, #302b87 0%, #8d2f88 46%, #ff885b 100%);
}

.screen-gloss {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 24%);
  pointer-events: none;
}

.screen-gloss.subtle {
  opacity: 0.6;
}

.flashlight-overlay {
  position: absolute;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 14% 88%, rgba(255, 254, 235, 0.95) 0, rgba(255, 247, 198, 0.52) 10%, rgba(255, 244, 184, 0.18) 21%, transparent 34%);
  mix-blend-mode: screen;
  transition: opacity 180ms ease;
}

.phone-screen.is-flashlight-on .flashlight-overlay {
  opacity: 1;
}

.lock-content {
  position: relative;
  z-index: 2;
  padding: 5.4rem 1.25rem 0;
  text-align: center;
}

.lock-state {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  opacity: 0.76;
}

.lock-time {
  margin: 0;
  font-size: clamp(4.3rem, 16vw, 5.6rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  font-weight: 300;
  text-shadow: 0 0.2rem 1rem rgba(0, 0, 0, 0.22);
}

.lock-date {
  margin: 0.35rem 0 0;
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.94;
}

.glass-card,
.glass-pill {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.09));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.12),
    0 1rem 2rem rgba(10, 8, 22, 0.18);
  border: 0.06rem solid rgba(255, 255, 255, 0.11);
}

.glass-card {
  border-radius: 1.4rem;
}

.glass-pill {
  border-radius: 999px;
}

.lock-note {
  width: min(100%, 18.2rem);
  margin: 3rem auto 0;
  padding: 1rem 1.2rem;
}

.lock-note p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.35;
}

.unlock-tray {
  position: absolute;
  left: 50%;
  bottom: 5.55rem;
  z-index: 3;
  width: calc(100% - 2.5rem);
  max-width: 19rem;
  transform: translateX(-50%);
  min-height: 4rem;
  padding: 0.45rem;
  display: grid;
  align-items: center;
}

.unlock-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.unlock-slider {
  appearance: none;
  width: 100%;
  height: 3rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border-radius: 999px;
  outline: none;
  margin: 0;
}

.unlock-slider::-webkit-slider-thumb {
  appearance: none;
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(243, 245, 249, 0.98)),
    #fff;
  box-shadow:
    0 0.75rem 1.25rem rgba(0, 0, 0, 0.24),
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.72);
  border: 0;
}

.unlock-slider::-moz-range-thumb {
  width: 2.85rem;
  height: 2.85rem;
  border-radius: 999px;
  border: 0;
  background: #fff;
  box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.24);
}

.unlock-slider::-webkit-slider-runnable-track,
.unlock-slider::-moz-range-track {
  height: 3rem;
  border-radius: 999px;
  background: transparent;
}

.quick-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.9rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  padding: 0 1.25rem;
}

.quick-action {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(12px);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.quick-action.is-active {
  background: rgba(255, 244, 184, 0.44);
  color: #2a2140;
  box-shadow:
    inset 0 0.08rem 0 rgba(255,255,255,0.52),
    0 0 1.1rem rgba(255, 236, 145, 0.42);
}

.notification-stack {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  top: 4.75rem;
  z-index: 48;
  display: grid;
  gap: 0.45rem;
  pointer-events: none;
}

.message-notification {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.75rem 0.85rem;
  border-radius: 1.3rem;
  background: rgba(246, 248, 252, 0.84);
  color: #171c26;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.72),
    0 0.9rem 1.6rem rgba(24, 24, 38, 0.16);
  border: 0.06rem solid rgba(255, 255, 255, 0.65);
  opacity: 0;
  transform: translateY(-0.8rem) scale(calc(1 - var(--stack-index, 0) * 0.04));
  transition:
    opacity 240ms ease,
    transform 240ms ease;
}

.message-notification.is-visible {
  opacity: 1;
  transform: translateY(calc(var(--stack-index, 0) * 0.12rem))
    scale(calc(1 - var(--stack-index, 0) * 0.04));
}

.message-notification.is-dismissed {
  opacity: 0;
  transform: translateY(-1rem) scale(0.96);
}

.message-notification.is-dimmed {
  opacity: 0.92;
}

.message-notification-icon {
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 0.68rem;
  object-fit: cover;
  box-shadow: 0 0.2rem 0.4rem rgba(25, 32, 46, 0.12);
}

.message-notification-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.message-app-label,
.message-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(31, 37, 49, 0.58);
}

.message-sender {
  margin-top: 0.12rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.message-body {
  margin-top: 0.16rem;
  font-size: 0.82rem;
  line-height: 1.3;
  color: rgba(23, 28, 38, 0.88);
}

.screen-home {
  padding-top: 4.75rem;
}

.screen-native-app {
  background: linear-gradient(180deg, #f4f5f8 0%, #eef1f6 100%);
  padding: 4.8rem 0.8rem 5.15rem;
  color: #171c26;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.screen-native-app::-webkit-scrollbar {
  display: none;
}

.native-app-surface {
  min-height: calc(100% - 0.25rem);
  border-radius: 1.85rem;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.7),
    0 1rem 1.8rem rgba(48, 55, 73, 0.12);
}

.native-app-content {
  min-height: 100%;
}

.native-app-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.95rem 1rem 0.75rem;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 0.06rem solid rgba(19, 23, 34, 0.08);
}

.native-app-header-left,
.native-app-header-right {
  min-width: 3rem;
  display: flex;
  align-items: center;
}

.native-app-header-left {
  justify-content: flex-start;
}

.native-app-header-right {
  justify-content: flex-end;
}

.native-app-close {
  color: var(--ios-blue);
  font-size: 0.95rem;
  font-weight: 600;
}

.native-app-more {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(23, 28, 38, 0.06);
  color: #667086;
  font-size: 1.2rem;
  line-height: 1;
}

.native-app-title-group {
  flex: 1;
  text-align: center;
}

.native-app-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(23, 28, 38, 0.52);
}

.native-app-title {
  margin: 0.1rem 0 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.native-app-body {
  padding: 0 1rem 1rem;
}

.ios-search {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.95rem;
  border: 0;
  background: rgba(23, 28, 38, 0.06);
  color: #171c26;
}

.ios-list {
  display: grid;
  gap: 0.75rem;
}

.ios-card {
  padding: 0.95rem 1rem;
  border-radius: 1.1rem;
  background: rgba(23, 28, 38, 0.04);
  box-shadow: inset 0 0.06rem 0 rgba(255, 255, 255, 0.4);
}

.ios-empty {
  min-height: 20rem;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(23, 28, 38, 0.5);
}

.ios-empty h3,
.native-section-title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  color: #171c26;
}

.ios-empty p {
  margin: 0.45rem 0 0;
  font-size: 0.92rem;
}

.notes-editor {
  width: 100%;
  min-height: 25rem;
  resize: none;
  border: 0;
  outline: none;
  padding: 1.1rem 0;
  font: inherit;
  font-size: 1rem;
  line-height: 1.75;
  color: #171c26;
  background:
    linear-gradient(180deg, transparent 0 1.62rem, rgba(238, 201, 63, 0.28) 1.62rem 1.68rem) 0 0 / 100% 1.68rem repeat-y;
}

.safari-page {
  display: grid;
  gap: 1rem;
}

.safari-bar {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(23, 28, 38, 0.06);
  color: rgba(23, 28, 38, 0.6);
  font-size: 0.95rem;
}

.safari-favorites {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.safari-favorite {
  text-align: center;
}

.safari-favorite-badge {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.45rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ff8c7a, #ffb45a);
  color: #fff;
  font-weight: 700;
}

.facetime-preview-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  background: linear-gradient(135deg, #dfe8f2, #b7c8db);
  min-height: 12.5rem;
}

.facetime-preview,
.facetime-preview-placeholder {
  width: 100%;
  min-height: 12.5rem;
  display: grid;
  place-items: center;
}

.facetime-preview {
  object-fit: cover;
  background: #000;
}

.facetime-preview-placeholder {
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: 1rem;
  background: linear-gradient(135deg, #46617b, #8fb8d8);
}

.call-log-list,
.findmy-list,
.contacts-list,
.mail-list {
  display: grid;
  gap: 0.7rem;
}

.call-log-item,
.findmy-item,
.contact-item,
.mail-item {
  display: grid;
  gap: 0.22rem;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  background: rgba(23, 28, 38, 0.04);
}

.call-log-meta,
.findmy-status,
.contact-subtitle,
.mail-subject {
  font-size: 0.82rem;
  color: rgba(23, 28, 38, 0.56);
}

.findmy-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
}

.findmy-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: #36cf82;
  box-shadow: 0 0 0 0.25rem rgba(54, 207, 130, 0.16);
}

.findmy-item.lost .findmy-dot {
  background: #ff6b63;
  box-shadow: 0 0 0 0.25rem rgba(255, 107, 99, 0.16);
}

.mail-thread {
  white-space: pre-wrap;
  line-height: 1.65;
}

.photos-empty-icon {
  width: 4.2rem;
  height: 4.2rem;
  margin: 0 auto 0.8rem;
  border-radius: 1.2rem;
  object-fit: cover;
}

.messages-thread {
  display: grid;
  gap: 0.7rem;
}

.bubble-row {
  display: flex;
}

.bubble {
  max-width: 78%;
  padding: 0.75rem 0.95rem;
  border-radius: 1.1rem;
  background: rgba(23, 28, 38, 0.08);
}

.voice-wave {
  display: flex;
  align-items: end;
  gap: 0.18rem;
  height: 3rem;
}

.voice-wave span {
  width: 0.22rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff545d, #4aa7ff);
}

.tv-hero,
.maps-hero,
.stocks-hero {
  border-radius: 1.3rem;
  overflow: hidden;
  padding: 1.1rem;
  color: #fff;
}

.tv-hero {
  background: linear-gradient(135deg, #111216, #384055);
}

.maps-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.24), transparent 34%),
    linear-gradient(135deg, #7be7ff, #4baeff 45%, #83f59b);
}

.stocks-hero {
  background: linear-gradient(135deg, #17191f, #2a3143);
}

.maps-hero .route-chip,
.tv-pill,
.stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.78rem;
  font-weight: 600;
}

.calendar-shell {
  display: grid;
  gap: 0.9rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.calendar-weekday,
.calendar-day {
  text-align: center;
  padding: 0.55rem 0;
  border-radius: 0.8rem;
  font-size: 0.82rem;
}

.calendar-weekday {
  color: rgba(23, 28, 38, 0.46);
  font-weight: 700;
}

.calendar-day {
  background: rgba(23, 28, 38, 0.04);
}

.calendar-day.muted {
  opacity: 0.32;
}

.calendar-day.today {
  background: #ff5b53;
  color: #fff;
  font-weight: 700;
}

.calculator-shell {
  display: grid;
  gap: 0.85rem;
}

.calculator-display {
  min-height: 6.6rem;
  padding: 1rem 0.4rem 0.2rem;
  text-align: right;
  font-size: 3.25rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.calculator-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.calculator-key {
  border-radius: 999px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  background: #31333a;
}

.calculator-key.function {
  background: #a6a8ae;
  color: #111216;
}

.calculator-key.operator {
  background: #ff9f0a;
}

.calculator-key.zero {
  grid-column: span 2;
  aspect-ratio: auto;
  border-radius: 999px;
  justify-items: start;
  padding-left: 1.5rem;
}

.home-pages {
  position: relative;
  z-index: 2;
  height: calc(100% - 10.4rem);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  cursor: grab;
}

.home-pages-track {
  display: flex;
  height: 100%;
  min-width: 100%;
}

.home-pages.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

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

.home-page {
  width: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 0.95rem 1rem 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 7.55rem;
  row-gap: 1.08rem;
  column-gap: 0.1rem;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.38rem;
  color: inherit;
  text-decoration: none;
  user-select: none;
}

.app-tile.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.app-tile.installed-app.is-installed .app-icon-wrap {
  animation: installedAppBounce 520ms ease;
}

.app-tile.buttonish:active .app-icon {
  transform: scale(0.96);
}

.app-icon-wrap {
  position: relative;
  width: 3.95rem;
  height: 3.95rem;
}

.app-icon-shadow {
  position: absolute;
  inset: 0.38rem 0.18rem -0.22rem;
  border-radius: 1.05rem;
  background: rgba(0, 0, 0, 0.22);
  filter: blur(10px);
}

.app-icon {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  background: var(--icon-bg, #4f4f4f);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.26),
    inset 0 -0.08rem 0 rgba(0, 0, 0, 0.05),
    0 0.08rem 0.15rem rgba(18, 22, 32, 0.06);
  overflow: hidden;
  transition: transform 120ms ease;
}

.app-icon::before {
  content: "";
  position: absolute;
  inset: 0.14rem;
  border-radius: 0.82rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 38%);
  pointer-events: none;
}

.app-icon.has-image::before {
  display: none;
}

.app-icon-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.icon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.app-icon-glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--icon-fg, #fff);
  letter-spacing: -0.03em;
}

.app-icon-glyph.text {
  font-size: 1.45rem;
}

.app-icon-glyph.small {
  font-size: 1rem;
}

.glyph-appstore,
.glyph-messages,
.glyph-notes,
.glyph-calendar,
.glyph-camera,
.glyph-tiktok {
  position: absolute;
  inset: 0;
}

.glyph-appstore i,
.glyph-camera i,
.glyph-tiktok i {
  position: absolute;
  display: block;
}

.glyph-appstore i {
  background: #fff;
  border-radius: 999px;
}

.glyph-appstore i:nth-child(1) {
  width: 0.32rem;
  height: 1.48rem;
  left: 1.32rem;
  top: 0.92rem;
  transform: rotate(29deg);
}

.glyph-appstore i:nth-child(2) {
  width: 0.32rem;
  height: 1.48rem;
  right: 1.32rem;
  top: 0.92rem;
  transform: rotate(-29deg);
}

.glyph-appstore i:nth-child(3) {
  width: 1.7rem;
  height: 0.32rem;
  left: 50%;
  bottom: 1.28rem;
  transform: translateX(-50%);
}

.glyph-messages .bubble {
  position: absolute;
  inset: 0.95rem 0.75rem 1.15rem;
  border-radius: 0.9rem;
  background: #fff;
}

.glyph-messages .tail {
  position: absolute;
  left: 1.12rem;
  bottom: 1.05rem;
  width: 0.58rem;
  height: 0.58rem;
  background: #fff;
  transform: rotate(45deg);
}

.glyph-messages .dot {
  position: absolute;
  top: 50%;
  width: 0.34rem;
  height: 0.34rem;
  margin-top: -0.17rem;
  border-radius: 999px;
  background: #20c45a;
}

.glyph-messages .dot.one {
  left: 1.55rem;
}

.glyph-messages .dot.two {
  left: 2rem;
}

.glyph-messages .dot.three {
  left: 2.45rem;
}

.glyph-notes .sheet,
.glyph-calendar .sheet,
.glyph-camera .body {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.glyph-notes .sheet {
  width: 2.25rem;
  height: 2.55rem;
  background: #fff;
  border-radius: 0.52rem;
}

.glyph-notes .sheet::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.64rem;
  border-radius: 0.52rem 0.52rem 0.35rem 0.35rem;
  background: #f0d940;
}

.glyph-notes .line {
  position: absolute;
  left: 50%;
  width: 1.3rem;
  height: 0.12rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #2a3040;
}

.glyph-notes .line.one {
  top: 1.12rem;
}

.glyph-notes .line.two {
  top: 1.48rem;
}

.glyph-notes .line.three {
  top: 1.84rem;
}

.glyph-calendar .sheet {
  width: 2.3rem;
  height: 2.6rem;
  background: #fff;
  border-radius: 0.56rem;
}

.glyph-calendar .sheet::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.72rem;
  border-radius: 0.56rem 0.56rem 0.35rem 0.35rem;
  background: #ef3c3f;
}

.glyph-calendar .day {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding-top: 0.48rem;
  color: #121722;
  font-size: 1.18rem;
  font-weight: 700;
}

.glyph-camera .body {
  width: 2.45rem;
  height: 1.65rem;
  border-radius: 0.6rem;
  background: #edf0f5;
}

.glyph-camera .lens {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #21252d;
}

.glyph-camera .flash {
  position: absolute;
  right: 1.12rem;
  top: 1.25rem;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: #cad2de;
}

.glyph-tiktok i {
  border-radius: 999px;
}

.glyph-tiktok .cyan-stem,
.glyph-tiktok .pink-stem,
.glyph-tiktok .white-stem {
  width: 0.34rem;
  height: 1.45rem;
  top: 1.18rem;
}

.glyph-tiktok .cyan-stem {
  left: 1.58rem;
  background: #22eddd;
}

.glyph-tiktok .pink-stem {
  left: 1.78rem;
  background: #ff487f;
}

.glyph-tiktok .white-stem {
  left: 1.68rem;
  background: #fff;
}

.glyph-tiktok .cyan-bar,
.glyph-tiktok .pink-bar,
.glyph-tiktok .white-bar {
  height: 0.34rem;
  width: 1rem;
  top: 1.18rem;
}

.glyph-tiktok .cyan-bar {
  left: 1.58rem;
  background: #22eddd;
}

.glyph-tiktok .pink-bar {
  left: 1.78rem;
  background: #ff487f;
}

.glyph-tiktok .white-bar {
  left: 1.68rem;
  background: #fff;
}

.glyph-tiktok .pink-dot,
.glyph-tiktok .white-dot {
  width: 0.82rem;
  height: 0.82rem;
  bottom: 1.05rem;
  border-radius: 999px;
}

.glyph-tiktok .pink-dot {
  left: 1.1rem;
  background: #ff487f;
}

.glyph-tiktok .white-dot {
  left: 1.3rem;
  background: #fff;
}

.app-label {
  width: 100%;
  max-width: 5.1rem;
  min-height: 1.6rem;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, 0.3);
}

.page-dots {
  position: absolute;
  left: 50%;
  bottom: 7.45rem;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
}

.page-dots span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: all 160ms ease;
}

.page-dots span.active {
  width: 0.58rem;
  height: 0.58rem;
  background: rgba(255, 255, 255, 0.95);
}

.dock {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 2.65rem;
  z-index: 3;
  min-height: 5.35rem;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 0.8rem 0.55rem;
}

.dock .app-icon-wrap {
  width: 3.7rem;
  height: 3.7rem;
}

.screen-store {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 211, 224, 0.75), transparent 18%),
    radial-gradient(circle at 14% 74%, rgba(189, 210, 255, 0.55), transparent 20%),
    linear-gradient(180deg, #f8fbff 0%, #fff5f7 40%, #eef1ff 100%);
  padding: 5.1rem 1rem 5.25rem;
  color: var(--text-dark);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  min-height: 100%;
}

.screen-store::-webkit-scrollbar,
.screen-game::-webkit-scrollbar {
  display: none;
}

.top-button {
  position: absolute;
  top: 4.35rem;
  width: 2.85rem;
  height: 2.85rem;
  z-index: 4;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-md);
  color: #fff;
}

.top-button.left {
  left: 1rem;
}

.top-button.right {
  right: 1rem;
}

.top-button span {
  font-size: 1.35rem;
  font-weight: 700;
}

.store-header {
  position: relative;
  z-index: 2;
  padding: 0 0.1rem 0 3.5rem;
}

.store-kicker {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(19, 23, 34, 0.66);
}

.store-header h2 {
  margin: 0.15rem 0 0;
  font-size: 2.15rem;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.feature-card {
  position: relative;
  margin-top: 1.25rem;
  width: 100%;
  min-height: 18.2rem;
  border-radius: 1.85rem;
  overflow: hidden;
  box-shadow: 0 1.4rem 2.8rem rgba(44, 43, 85, 0.16);
  text-align: left;
  cursor: pointer;
}

.feature-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.28), transparent 18%),
    linear-gradient(135deg, #ff5f8d, #b657ff 45%, #468dff 100%);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 34%);
}

.feature-copy,
.feature-icon,
.feature-install {
  position: relative;
  z-index: 2;
}

.feature-copy {
  padding: 1.45rem 1.5rem 1.35rem;
  width: 68%;
  color: #fff;
}

.feature-kicker {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.84;
}

.feature-copy h3 {
  margin: 0.6rem 0 0;
  font-size: 2.65rem;
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.feature-body {
  margin: 1rem 0 0;
  max-width: 16rem;
  font-size: 1rem;
  line-height: 1.35;
}

.feature-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0.9;
  max-width: 11rem;
}

.feature-icon {
  position: absolute;
  right: 1.2rem;
  top: 6.1rem;
  width: 5.25rem;
  height: 5.25rem;
  border-radius: 1.5rem;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.28),
    0 1rem 1.8rem rgba(39, 17, 82, 0.2);
}

.feature-icon::before {
  content: "";
  position: absolute;
  inset: 0.3rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), transparent 40%);
}

.feature-icon span {
  position: relative;
  font-size: 3.05rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.feature-install {
  position: absolute;
  right: 1.35rem;
  bottom: 1.25rem;
}

.install-button {
  position: relative;
  width: 7rem;
  height: 2.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: #fff;
  color: var(--ios-blue);
  box-shadow: 0 0.7rem 1.1rem rgba(0, 0, 0, 0.12);
}

.install-button.is-open {
  background: var(--ios-blue);
  color: #fff;
}

.install-button.is-busy {
  pointer-events: none;
}

.install-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.install-arrow,
.ring-arrow {
  position: relative;
  width: 0.95rem;
  height: 0.95rem;
}

.install-arrow i,
.ring-arrow i {
  position: absolute;
  display: block;
  background: currentColor;
  border-radius: 999px;
}

.install-arrow i:nth-child(1),
.ring-arrow i:nth-child(1) {
  width: 0.16rem;
  height: 0.64rem;
  left: 50%;
  top: 0.05rem;
  transform: translateX(-50%);
}

.install-arrow i:nth-child(2),
.ring-arrow i:nth-child(2) {
  width: 0.16rem;
  height: 0.45rem;
  left: 0.28rem;
  bottom: 0.15rem;
  transform: rotate(-45deg);
}

.install-arrow i:nth-child(3),
.ring-arrow i:nth-child(3) {
  width: 0.16rem;
  height: 0.45rem;
  right: 0.28rem;
  bottom: 0.15rem;
  transform: rotate(45deg);
}

.install-progress {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--ios-blue);
}

.install-button.is-busy .install-arrow,
.install-button.is-busy .install-label {
  opacity: 0;
}

.install-button.is-busy .install-progress {
  display: grid;
}

.install-progress svg {
  width: 1.85rem;
  height: 1.85rem;
  transform: rotate(-90deg);
}

.install-progress .track,
.install-progress .progress-ring {
  fill: none;
  stroke-width: 3;
}

.install-progress .track {
  stroke: rgba(22, 126, 251, 0.16);
}

.install-progress .progress-ring {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-dasharray: 94.25;
  stroke-dashoffset: calc(94.25 - (94.25 * var(--progress)));
}

.ring-arrow {
  position: absolute;
  color: var(--ios-blue);
  transform: scale(0.84);
}

.store-list {
  position: relative;
  z-index: 2;
  margin-top: 1.25rem;
}

.section-title-row {
  margin-bottom: 0.75rem;
}

.section-title-row h3 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: -0.04em;
}

.store-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 0.9rem;
  margin-bottom: 0.75rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1rem 1.8rem rgba(53, 62, 112, 0.1);
}

.store-row .store-icon {
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 1rem;
}

.store-row .store-icon .app-icon-shadow {
  inset: 0.3rem 0.14rem -0.16rem;
}

.store-row .store-meta h4 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.03em;
}

.store-row .store-meta p {
  margin: 0.16rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.row-get {
  min-width: 4rem;
  height: 2rem;
  padding: 0 1rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(22, 126, 251, 0.11);
  color: var(--ios-blue);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.screen-game {
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 226, 236, 0.28), transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 190, 136, 0.22), transparent 24%),
    linear-gradient(180deg, #302b87 0%, #8d2f88 46%, #ff885b 100%);
  padding: 5.9rem 1rem 5.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 100%;
}

.game-app-shell {
  position: relative;
  z-index: 2;
  min-height: calc(100% - 0.4rem);
  padding: 1.55rem 0.95rem 1rem;
  border-radius: 1.9rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 22%);
  color: #2a2140;
  box-shadow:
    inset 0 0.08rem 0 rgba(255, 255, 255, 0.7),
    0 1.25rem 2rem rgba(42, 13, 71, 0.18);
  border: 0.06rem solid rgba(255, 255, 255, 0.22);
}

.game-header {
  position: relative;
  z-index: 2;
  padding: 0 3.2rem 0 0.2rem;
}

.game-header h2 {
  margin: 0.15rem 0 0;
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.06em;
  color: #281d3d;
}

.game-subtitle {
  margin-top: 0.85rem;
  padding: 0.95rem 1rem;
  font-size: 0.88rem;
  line-height: 1.35;
  color: rgba(42, 33, 64, 0.78);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 239, 252, 0.94));
  box-shadow:
    inset 0 0.06rem 0 rgba(255,255,255,0.55),
    0 0.5rem 1.2rem rgba(82, 48, 145, 0.08);
}

.ticket-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1rem;
}

.ticket-chip {
  padding: 0.95rem 1rem;
  border-radius: 1.2rem;
  text-align: left;
  background: linear-gradient(135deg, #f1eff9, #f8f3fb);
  color: #2a2140;
  box-shadow:
    inset 0 0.06rem 0 rgba(255,255,255,0.56),
    0 0.55rem 1rem rgba(67, 61, 104, 0.08);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.ticket-chip:nth-child(1) {
  background: linear-gradient(135deg, #8e6bff, #ff83b6);
  color: #fff;
}

.ticket-chip:nth-child(2) {
  background: linear-gradient(135deg, #4c5dff, #7a55ff);
  color: #fff;
}

.ticket-chip:nth-child(3) {
  background: linear-gradient(135deg, #40b7ff, #63e2be);
  color: #14314b;
}

.ticket-chip.is-active {
  transform: translateY(-0.08rem) scale(1.01);
  box-shadow:
    inset 0 0 0 0.14rem rgba(255,255,255,0.42),
    0 0.75rem 1.35rem rgba(74, 58, 128, 0.16);
}

.ticket-chip.is-complete {
  box-shadow:
    inset 0 0 0 0.14rem rgba(80, 216, 132, 0.9),
    0 0.75rem 1.35rem rgba(74, 58, 128, 0.16);
}

.ticket-chip-tag {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  opacity: 0.86;
  white-space: nowrap;
}

.ticket-chip-title {
  min-width: 0;
}

.ticket-chip strong {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.98rem;
  letter-spacing: -0.03em;
}

.ticket-chip-subtitle {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.72rem;
  opacity: 0.92;
}

.ticket-chip-arrow {
  font-size: 1.2rem;
  opacity: 0.88;
  font-weight: 700;
}

.scratcher-code-panel {
  margin-top: 0.85rem;
  padding: 0.72rem 0.82rem;
  border-radius: 1rem;
  background: rgba(20, 24, 52, 0.18);
  border: 0.06rem dashed rgba(255, 255, 255, 0.3);
}

.scratcher-code-label {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.84;
}

.scratcher-code-value {
  margin-top: 0.26rem;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.scratcher-code-panel:not(.is-visible) .scratcher-code-value {
  letter-spacing: 0.12em;
  opacity: 0.78;
}

.ticket-stage {
  margin-top: 0.95rem;
}

.scratch-stage-card {
  border-radius: 1.35rem;
  overflow: hidden;
  box-shadow: 0 1rem 1.8rem rgba(42, 13, 71, 0.14);
}

.cashword-ticket {
  background: linear-gradient(180deg, #4668ff, #9e53ff);
  padding: 0.85rem;
  color: #fff;
}

.cashword-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.cashword-logo {
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 0.1rem 0 rgba(31, 18, 86, 0.22);
}

.cashword-jackpot {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  font-size: 0.72rem;
  font-weight: 700;
}

.cashword-board {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.8rem;
}

.cashword-grid {
  padding: 0.6rem;
  border-radius: 1rem;
  background: #d9853f;
  border: 0.18rem solid #7f451c;
}

.cashword-grid-row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.cashword-cell {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 0.83rem;
  font-weight: 800;
  color: #2f1607;
  border: 0.06rem solid rgba(98, 50, 19, 0.22);
  background: rgba(124, 67, 28, 0.08);
  overflow: hidden;
}

.cashword-cell.is-locked {
  opacity: 1;
}

.cashword-cell.is-unlocked {
  box-shadow: inset 0 0 0 0.08rem rgba(255, 245, 196, 0.36);
}

.cashword-cell-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.cashword-cell canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.cashword-cell.is-revealed {
  color: #fff7dc;
  background: rgba(53, 20, 7, 0.18);
}

.cashword-cell.is-word-found {
  background: rgba(104, 255, 177, 0.26);
  box-shadow:
    inset 0 0 0 0.08rem rgba(220, 255, 233, 0.44),
    0 0 0.25rem rgba(104, 255, 177, 0.18);
}

.cashword-sidebar {
  padding: 0.7rem;
  border-radius: 1rem;
  background: rgba(255,255,255,0.14);
}

.cashword-counter {
  font-size: 0.86rem;
  font-weight: 700;
}

.cashword-word-list {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.6rem;
}

.cashword-legend {
  margin-top: 0.7rem;
  padding: 0.65rem 0.72rem;
  border-radius: 0.9rem;
  background: rgba(23, 28, 55, 0.18);
  font-size: 0.72rem;
  line-height: 1.4;
}

.cashword-legend-title {
  margin-bottom: 0.3rem;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cashword-word {
  padding: 0.45rem 0.6rem;
  border-radius: 0.8rem;
  background: rgba(255,255,255,0.08);
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.76);
}

.cashword-word.is-found {
  background: rgba(92, 235, 164, 0.26);
  color: #effff7;
}

.cashword-letters-title {
  margin-top: 0.82rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.cashword-letters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.cashword-letter {
  position: relative;
  border-radius: 0.88rem;
  background: rgba(255,255,255,0.16);
  min-height: 3rem;
  overflow: hidden;
}

.cashword-letter-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 900;
  color: #2b215a;
}

.cashword-letter canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.cashword-letter.is-revealed {
  box-shadow: inset 0 0 0 0.12rem rgba(255,255,255,0.55);
}

.cashword-letter.revealed canvas,
.tripler-box.revealed canvas,
.treat-cell.revealed canvas {
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.cashword-prize-banner {
  margin-top: 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 0.92rem;
  background: rgba(22, 28, 55, 0.3);
  font-size: 0.84rem;
}

.cashword-prize-banner::after {
  content: "No win if you only find 7.";
  display: block;
  margin-top: 0.28rem;
  font-size: 0.72rem;
  opacity: 0.84;
}

.tripler-ticket {
  background: linear-gradient(180deg, #2738be, #5f31ff);
  padding: 0.9rem;
  color: #fff;
}

.tripler-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
}

.tripler-price,
.tripler-badge {
  padding: 0.35rem 0.6rem;
  border-radius: 0.75rem;
  background: rgba(255,255,255,0.16);
  font-size: 0.72rem;
  font-weight: 800;
}

.tripler-title {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.tripler-subtitle {
  margin-top: 0.1rem;
  font-size: 1rem;
  font-weight: 800;
}

.tripler-rules {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  line-height: 1.35;
  opacity: 0.92;
}

.tripler-plays {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.tripler-row {
  display: grid;
  grid-template-columns: auto 5rem 1fr;
  gap: 0.55rem;
  align-items: stretch;
}

.tripler-row-label {
  display: grid;
  place-items: center;
  padding: 0.2rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tripler-box {
  position: relative;
  min-height: 3.6rem;
  border-radius: 0.95rem;
  overflow: hidden;
  background: rgba(255,255,255,0.18);
  display: grid;
  place-items: center;
}

.tripler-hidden {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1rem;
  text-align: center;
  padding: 0.4rem;
}

.tripler-symbol {
  font-size: 1.45rem;
}

.tripler-box canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.tripler-row-result {
  grid-column: 2 / 4;
  font-size: 0.74rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
}

.tripler-row.is-complete .tripler-row-result {
  color: #ffd7d7;
}

.treat-ticket {
  background: linear-gradient(180deg, #40b7ff, #63e2be);
  padding: 0.9rem;
  color: #14314b;
  box-shadow:
    0 0 0 0.12rem rgba(255,255,255,0.16),
    0 0 1.4rem rgba(74, 255, 196, 0.18);
}

.treat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.treat-title {
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.treat-subtitle,
.treat-code {
  font-size: 0.76rem;
  font-weight: 700;
}

.treat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.treat-cell {
  position: relative;
  min-height: 4.2rem;
  border-radius: 1rem;
  overflow: hidden;
  background: rgba(255,255,255,0.18);
}

.treat-cell-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.4rem;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #14314b;
}

.treat-cell.is-gift .treat-cell-value {
  font-size: 1.3rem;
  color: #18202a;
}

.treat-cell canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.treat-summary {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.55rem;
}

.treat-counter {
  font-size: 0.82rem;
  font-weight: 700;
}

.gift-boxes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.gift-box-chip {
  padding: 0.55rem 0.3rem;
  border-radius: 0.8rem;
  background: rgba(255,255,255,0.18);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.gift-box-chip.is-found {
  background: rgba(255,255,255,0.34);
}

.gift-goal-banner {
  margin-top: 0.72rem;
  padding: 0.62rem 0.72rem;
  border-radius: 0.92rem;
  background: rgba(14, 52, 74, 0.16);
  font-size: 0.76rem;
  font-weight: 700;
}

.treat-ticket.is-ready {
  box-shadow:
    0 0 0 0.14rem rgba(255,255,255,0.18),
    0 0 1.8rem rgba(104, 255, 177, 0.3);
}

.special-prize-wrap {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

.special-prize-box {
  width: 7rem;
  height: 7rem;
  border-radius: 1.5rem;
  background: linear-gradient(180deg, #171a22, #0f1117);
  color: #fff;
  box-shadow:
    inset 0 0.08rem 0 rgba(255,255,255,0.08),
    0 0.9rem 1.6rem rgba(27, 36, 44, 0.24);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition:
    transform 220ms ease,
    opacity 220ms ease,
    box-shadow 220ms ease;
}

.special-prize-box::before,
.special-prize-box::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.9);
}

.special-prize-box::before {
  width: 0.36rem;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.special-prize-box::after {
  height: 0.36rem;
  width: 100%;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.special-prize-box svg {
  position: relative;
  z-index: 2;
  width: 2.45rem;
  height: 2.45rem;
}

.special-prize-box.is-ready {
  box-shadow:
    inset 0 0.08rem 0 rgba(255,255,255,0.08),
    0 0 0.2rem rgba(255,255,255,0.16),
    0 0 1.4rem rgba(117, 247, 201, 0.26);
}

.special-prize-box.is-opening {
  animation: prizeBoxDropAway 640ms ease forwards;
}

.special-prize-box.is-opened {
  opacity: 0;
  pointer-events: none;
}

.special-prize-box.is-opening::before,
.special-prize-box.is-opening::after {
  opacity: 0.15;
}

@keyframes prizeBoxDropAway {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  32% {
    transform: translateY(-0.9rem) scale(1.06) rotate(-3deg);
    opacity: 1;
  }

  100% {
    transform: translateY(2.8rem) scale(0.82) rotate(9deg);
    opacity: 0;
  }
}

.final-reveal {
  position: relative;
  z-index: 2;
  margin-top: 0.95rem;
  padding: 0.9rem 1rem;
  font-size: 0.86rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(0.5rem);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.final-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.sleep-overlay {
  position: absolute;
  inset: 0;
  z-index: 60;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.03), transparent 12%),
    #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.phone-screen.is-sleeping .sleep-overlay {
  opacity: 1;
}

.phone-screen.is-sleeping .screen,
.phone-screen.is-sleeping .status-bar,
.phone-screen.is-sleeping .home-indicator {
  opacity: 0;
  pointer-events: none;
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 0.48rem;
  width: 9rem;
  height: 1.1rem;
  transform: translateX(-50%);
  z-index: 55;
  touch-action: none;
}

.home-indicator::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.22rem;
  width: 7.8rem;
  height: 0.34rem;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0.08rem 0.2rem rgba(0, 0, 0, 0.12);
}

.screen.is-gesture-active {
  transition: none;
  will-change: transform, border-radius, filter;
}

@media (max-width: 460px) {
  .phone-shell {
    width: min(96vw, calc(94vh * 393 / 852), 24rem);
  }

  .home-page {
    grid-auto-rows: 7.85rem;
    row-gap: 1.2rem;
    column-gap: 0.18rem;
  }

  .app-icon-wrap {
    width: 3.72rem;
    height: 3.72rem;
  }

  .app-label {
    max-width: 4.8rem;
    min-height: 1.78rem;
    font-size: 0.63rem;
    line-height: 1.08;
  }

  .feature-copy {
    width: 72%;
    padding-right: 1rem;
  }

  .feature-copy h3 {
    font-size: 2.3rem;
  }

  .feature-icon {
    right: 0.95rem;
    width: 4.8rem;
    height: 4.8rem;
  }
}

@media (max-height: 820px) {
  .stage {
    padding: 0.7rem;
  }

  .unlock-tray {
    bottom: 5rem;
  }

  .quick-actions {
    bottom: 1.55rem;
  }
}

@keyframes installedAppBounce {
  0% {
    transform: scale(0.82);
  }

  55% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}
