﻿/* Shift — native iOS (HIG), not a desktop web demo */

:root {
  --ios-blue: #0A84FF;
  --ios-green: #30D158;
  --ios-orange: #FF9F0A;
  --ios-red: #FF453A;
  --ios-purple: #BF5AF2;
  --ios-pink: #FF375F;
  --ios-teal: #64D2FF;
  --ios-indigo: #5E5CE6;

  --bg: #050A14;
  --bg-mid: #0B1A33;
  --bg-elevated: rgba(255, 255, 255, 0.08);
  --bg-elevated-solid: rgba(22, 32, 52, 0.72);
  --label: #FFFFFF;
  --secondary-label: rgba(235, 235, 245, 0.62);
  --tertiary-label: rgba(235, 235, 245, 0.32);
  --separator: rgba(255, 255, 255, 0.12);
  --separator-light: rgba(255, 255, 255, 0.08);
  --fill: rgba(120, 120, 128, 0.28);
  --fill-secondary: rgba(120, 120, 128, 0.18);
  --tint: #0A84FF;

  --glass: rgba(255, 255, 255, 0.075);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-highlight: rgba(255, 255, 255, 0.28);
  --glass-blur: 28px;
  --glass-sat: 190%;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.28), inset 0 1px 0 var(--glass-highlight);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;

  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --spring: cubic-bezier(0.2, 0.9, 0.3, 1.1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --nav-h: 52px;
  --nav-space: calc(var(--nav-h) + var(--safe-bottom));
  --page-x: 16px;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background:
    radial-gradient(110% 70% at 50% -18%, rgba(10, 132, 255, 0.42), transparent 58%),
    radial-gradient(80% 55% at 100% 85%, rgba(30, 80, 180, 0.35), transparent 55%),
    radial-gradient(70% 45% at 0% 70%, rgba(0, 60, 140, 0.25), transparent 50%),
    linear-gradient(180deg, #0A1628 0%, #050A14 48%, #03060C 100%);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-y: none;
}

body {
  overflow-x: hidden;
  touch-action: pan-y;
}

button, input, textarea {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

button { cursor: pointer; }

/* Full-bleed phone app — no desktop “card in browser” frame */
.shift-app {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100dvh;
  padding:
    calc(4px + var(--safe-top))
    calc(var(--page-x) + var(--safe-right))
    calc(var(--nav-space) + 8px)
    calc(var(--page-x) + var(--safe-left));
  background: transparent;
}

.shift-ambient {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(90% 50% at 85% 0%, rgba(10, 132, 255, 0.32), transparent 55%),
    radial-gradient(70% 40% at 8% 88%, rgba(0, 100, 220, 0.22), transparent 52%),
    radial-gradient(50% 30% at 50% 55%, rgba(100, 210, 255, 0.06), transparent 60%);
}

/* Liquid Glass — iOS 2025 */
.glass {
  background: var(--glass);
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.03) 42%, transparent 70%);
  backdrop-filter: saturate(var(--glass-sat)) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(var(--glass-sat)) blur(var(--glass-blur));
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
  border-radius: var(--radius-lg);
}

.glass-bar {
  background: rgba(8, 14, 28, 0.55);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-color: rgba(255, 255, 255, 0.1);
}

.svg-icon {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  line-height: 0;
  flex-shrink: 0;
}
.svg-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.chevron-svg {
  width: 16px;
  height: 16px;
  color: rgba(235, 235, 245, 0.35);
  margin-left: 2px;
}
.row__icon .svg-icon {
  width: 16px;
  height: 16px;
  color: #fff;
}
.shortcut__icon .svg-icon,
.banner__icon .svg-icon,
.game-art .svg-icon,
.clan-badge .svg-icon,
.ai-tile__icon .svg-icon,
.result__icon .svg-icon {
  width: 100%;
  height: 100%;
  color: #fff;
}
.shift-nav__icon .svg-icon {
  width: 24px;
  height: 24px;
}
.composer-bar .tool .svg-icon,
.composer-send .svg-icon,
.back .svg-icon {
  width: 22px;
  height: 22px;
}
.suggest .svg-icon {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
}

.screen-host { position: relative; z-index: 1; }

.screen { display: none; }
.screen.is-active {
  display: block;
  animation: iosIn 0.32s var(--ease-ios) both;
}
.screen.is-back { animation-name: iosBack; }

@keyframes iosIn {
  from { opacity: 0; transform: translate3d(18px, 0, 0); }
  to { opacity: 1; transform: none; }
}
@keyframes iosBack {
  from { opacity: 0; transform: translate3d(-12px, 0, 0); }
  to { opacity: 1; transform: none; }
}

/* Large Title — iOS */
.greeting {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--secondary-label);
}

.large-title {
  margin: 0 0 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.37px;
  line-height: 41px;
  color: var(--label);
}

.subtitle {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 20px;
  color: var(--secondary-label);
}

.section-label {
  margin: 24px 0 7px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: -0.08px;
  text-transform: uppercase;
  color: var(--secondary-label);
}

.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 24px 0 7px;
  padding: 0 4px;
}
.section-row .section-label { margin: 0; }
.see-all {
  font-size: 17px;
  font-weight: 400;
  color: var(--tint);
}

/* Inset Grouped List */
.group {
  background: var(--glass);
  background-image:
    linear-gradient(165deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 45%, transparent 72%);
  backdrop-filter: saturate(var(--glass-sat)) blur(var(--glass-blur));
  -webkit-backdrop-filter: saturate(var(--glass-sat)) blur(var(--glass-blur));
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 0.5px solid var(--glass-border);
  box-shadow: var(--shadow-glass);
}
.group.glass {
  /* already glass; keep class for markup consistency */
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 11px 16px;
  text-align: left;
  background: transparent;
  position: relative;
}
.row:active { background: rgba(255, 255, 255, 0.08); }

.row + .row::before {
  content: "";
  position: absolute;
  left: 58px;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--separator-light);
  transform: scaleY(0.5);
  transform-origin: top;
}

.row__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.row__body { flex: 1; min-width: 0; }
.row__title {
  display: block;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.41px;
  color: var(--label);
}
.row__sub {
  display: block;
  margin-top: 1px;
  font-size: 15px;
  color: var(--secondary-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row__meta {
  font-size: 17px;
  color: var(--secondary-label);
  flex-shrink: 0;
}
.chevron {
  color: rgba(235, 235, 245, 0.3);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  margin-left: 2px;
}
.badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--ios-red);
}

/* Home widgets */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  text-align: left;
}
.stat-card.glass {
  /* markup class */
}
.stat-card small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--secondary-label);
  margin-bottom: 6px;
}
.stat-card strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.36px;
  color: var(--label);
  line-height: 1;
}
.stat-card span {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  color: var(--secondary-label);
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.shortcut__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  transition: transform 0.15s var(--spring);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 6px 16px rgba(0, 0, 0, 0.2);
}
.shortcut__icon .svg-icon {
  width: 28px;
  height: 28px;
}
.shortcut:active .shortcut__icon { transform: scale(0.88); }
.shortcut span {
  font-size: 12px;
  font-weight: 400;
  color: var(--label);
  text-align: center;
}

.bg-blue { background: var(--ios-blue); }
.bg-green { background: var(--ios-green); }
.bg-purple { background: var(--ios-purple); }
.bg-orange { background: var(--ios-orange); }
.bg-pink { background: var(--ios-pink); }
.bg-teal { background: var(--ios-teal); }

/* Clan card — home */
.clan-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  margin-top: 0;
}
.clan-card__top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.clan-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.95), rgba(94, 92, 230, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 20px rgba(10, 132, 255, 0.25);
  flex-shrink: 0;
  color: #fff;
}
.clan-badge .svg-icon {
  width: 24px;
  height: 24px;
}
.clan-badge--live {
  background: linear-gradient(145deg, #0A84FF, #5E5CE6 55%, #BF5AF2);
}
.clan-card__copy {
  min-width: 0;
  flex: 1;
}
.clan-card__copy strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.08px;
  color: var(--secondary-label);
  text-transform: uppercase;
}
.clan-card__copy span,
.clan-name {
  display: block;
  margin-top: 2px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.41px;
  color: var(--label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clan-card__copy small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--secondary-label);
}
.clan-card__hint {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--secondary-label);
}
.clan-card__hint em {
  font-style: normal;
  color: var(--ios-teal);
  font-weight: 600;
}
.clan-card--empty .clan-badge {
  background: rgba(120, 120, 128, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.clan-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.clan-stats > div {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.clan-stats__icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-bottom: 4px;
  color: var(--ios-teal);
}
.clan-stats__icon .svg-icon {
  width: 16px;
  height: 16px;
}
.clan-stats strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--label);
}
.clan-stats small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--secondary-label);
}

/* Search */
.search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--fill);
}
.search svg {
  width: 16px;
  height: 16px;
  color: var(--secondary-label);
  flex-shrink: 0;
}
.search input {
  flex: 1;
  min-width: 0;
  font-size: 17px;
  color: var(--label);
}
.search input::placeholder { color: var(--secondary-label); }

/* Segmented Control */
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 2px;
  margin-bottom: 12px;
  border-radius: 9px;
  background: var(--fill);
}
.segmented button {
  min-height: 28px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--label);
}
.segmented button.is-active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  color: #fff;
}

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(10, 132, 255, 0.38), rgba(18, 28, 46, 0.55));
  border: 0.5px solid rgba(100, 210, 255, 0.35);
  box-shadow: var(--shadow-glass);
  text-align: left;
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.banner:active { opacity: 0.85; }
.banner__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--ios-teal);
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.banner__icon .svg-icon {
  width: 22px;
  height: 22px;
}
.banner strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--label);
}
.banner span span,
.banner > span > span {
  font-size: 15px;
  font-weight: 400;
  color: var(--secondary-label);
}

/* Chat thread — Messages style */
.thread {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--safe-top));
  margin: calc(-4px - var(--safe-top)) calc(-1 * var(--page-x) - var(--safe-right)) calc(-8px - var(--nav-space)) calc(-1 * var(--page-x) - var(--safe-left));
  background: #060B16;
}

.thread__bar {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  min-height: 44px;
  padding: calc(4px + var(--safe-top)) 4px 8px;
  background: rgba(8, 14, 28, 0.55);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-bottom: 0.5px solid var(--separator);
}
.thread__bar .back {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tint);
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
}
.thread__bar .back .svg-icon {
  width: 24px;
  height: 24px;
}
.thread__who { text-align: center; }
.thread__who strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  color: var(--label);
}
.thread__who span {
  font-size: 12px;
  color: var(--secondary-label);
}

.messages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
}

.bubble {
  max-width: 75%;
  padding: 7px 12px;
  font-size: 17px;
  line-height: 22px;
  letter-spacing: -0.41px;
  animation: bubbleIn 0.22s var(--ease-ios) both;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.bubble--me {
  align-self: flex-end;
  background: var(--ios-blue);
  color: #fff;
  border-radius: 18px 18px 4px 18px;
}
.bubble--them {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
  color: var(--label);
  border-radius: 18px 18px 18px 4px;
}
.typing {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--secondary-label);
  font-size: 13px;
}

.suggest {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 12px;
  scrollbar-width: none;
  background: transparent;
}
.suggest::-webkit-scrollbar { display: none; }
.suggest button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 400;
  color: var(--tint);
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 6px 8px calc(6px + var(--safe-bottom));
  background: rgba(8, 14, 28, 0.55);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-top: 0.5px solid var(--separator);
}
.composer-bar .tool {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
  display: grid;
  place-items: center;
  color: var(--tint);
  border-radius: 50%;
  background: rgba(10, 132, 255, 0.12);
}
.composer-field {
  flex: 1;
  min-height: 34px;
  max-height: 100px;
  padding: 7px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 0.5px solid var(--glass-border);
  font-size: 17px;
  color: #fff;
  resize: none;
  line-height: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.composer-field::placeholder { color: var(--secondary-label); }
.composer-send {
  width: 34px;
  height: 34px;
  margin-bottom: 2px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ios-blue);
  color: #fff;
  opacity: 0.35;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.35);
}
.composer-send.is-ready {
  opacity: 1;
  pointer-events: auto;
}

/* AI */
.ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.ai-tile {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  text-align: left;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-glass);
}
.ai-tile:active { opacity: 0.7; }
.ai-tile__icon {
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  color: var(--ios-teal);
}
.ai-tile__icon .svg-icon {
  width: 28px;
  height: 28px;
  color: var(--ios-teal);
}
.ai-tile strong {
  font-size: 17px;
  font-weight: 600;
  color: var(--label);
}
.ai-tile span {
  margin-top: 2px;
  font-size: 13px;
  color: var(--secondary-label);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 600;
}
.btn:active { opacity: 0.7; }
.btn--primary {
  background: var(--ios-blue);
  color: #fff;
}
.btn--blue {
  background: var(--ios-blue);
  color: #fff;
}
.btn--wide { width: 100%; }
.btn--ghost {
  background: var(--fill);
  color: var(--ios-blue);
}

/* Games */
.featured {
  display: block;
  width: 100%;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.4), rgba(94, 92, 230, 0.22) 55%, rgba(18, 28, 46, 0.45));
  border: 0.5px solid rgba(100, 210, 255, 0.32);
  text-align: left;
  margin-top: 12px;
  box-shadow: var(--shadow-glass);
}
.featured:active { opacity: 0.85; }
.featured .tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: rgba(10, 132, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.featured h3 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--label);
}
.featured p {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--secondary-label);
}

.game-art {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(145deg, rgba(10, 132, 255, 0.85), rgba(94, 92, 230, 0.75));
  color: #fff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.game-art .svg-icon {
  width: 22px;
  height: 22px;
}

/* Immersive play */
.play {
  margin: calc(-4px - var(--safe-top)) calc(-1 * var(--page-x) - var(--safe-right)) calc(-8px - var(--nav-space)) calc(-1 * var(--page-x) - var(--safe-left));
  min-height: 100dvh;
  padding: calc(8px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  background: linear-gradient(180deg, #0B1A33 0%, #060B16 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.play__top {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
}
.play__top .back {
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--tint);
}
.play__top .back .svg-icon {
  width: 24px;
  height: 24px;
}
.play__top h1 {
  margin: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  color: var(--label);
}

.score-panel { text-align: center; }
.score-panel small {
  display: block;
  font-size: 13px;
  color: var(--secondary-label);
  margin-bottom: 2px;
}
.score-panel strong {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--label);
  display: inline-block;
  transition: transform 0.15s var(--spring);
}
.score-panel strong.pop { transform: scale(1.08); }

.progress {
  height: 4px;
  border-radius: 2px;
  background: var(--fill);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--ios-blue);
  border-radius: inherit;
  transition: width 0.2s linear;
}
.timer-text {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--secondary-label);
}

.q-card {
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  text-align: center;
  box-shadow: var(--shadow-glass);
}
.q-card small {
  display: block;
  color: var(--secondary-label);
  font-size: 13px;
  margin-bottom: 8px;
}
.q-card strong {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.37px;
  color: var(--label);
}

.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.answer {
  min-height: 56px;
  border-radius: var(--radius-md);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  font-size: 22px;
  font-weight: 600;
  color: var(--label);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.answer:active { background: rgba(255, 255, 255, 0.12); }
.answer.ok { background: var(--ios-green); color: #fff; }
.answer.bad { background: var(--ios-red); color: #fff; }

.tap-zone {
  flex: 1;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  min-height: 240px;
  user-select: none;
  box-shadow: var(--shadow-glass);
}
.tap-zone:active { background: rgba(255, 255, 255, 0.1); }
.tap-target {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--ios-blue);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.35);
}

.result {
  margin: auto 0;
  padding: 28px 20px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  text-align: center;
  box-shadow: var(--shadow-glass);
}
.result__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #FF9F0A, #FF453A);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 159, 10, 0.35);
}
.result__icon .svg-icon {
  width: 28px;
  height: 28px;
}
.result h2 {
  margin: 12px 0 4px;
  font-size: 28px;
  font-weight: 700;
}
.result p {
  margin: 0 0 20px;
  color: var(--secondary-label);
  font-size: 17px;
}
.result .actions { display: grid; gap: 10px; }

/* Profile */
.profile-card {
  margin-top: 8px;
  padding: 22px 16px 16px;
  border-radius: var(--radius-lg);
  background: var(--glass);
  border: 0.5px solid var(--glass-border);
  text-align: center;
  box-shadow: var(--shadow-glass);
}
.avatar-xl {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 32px;
  font-weight: 600;
  color: #fff;
  background: var(--ios-blue);
  overflow: hidden;
  position: relative;
}
.avatar-xl--photo {
  padding: 0;
  background: var(--bg-elevated-solid);
}
.avatar-xl img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  z-index: 1;
}
.avatar-xl__fallback {
  position: relative;
  z-index: 0;
}
.profile-card h2 {
  margin: 0 0 2px;
  font-size: 22px;
  font-weight: 700;
}
.profile-card .id {
  display: block;
  margin-bottom: 14px;
  font-size: 15px;
  color: var(--secondary-label);
}
.p-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.p-stats div {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}
.p-stats strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
}
.p-stats small {
  font-size: 12px;
  color: var(--secondary-label);
}

/* Tab Bar — system */
.shift-nav {
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  transform: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding: 4px 0 var(--safe-bottom);
  background: rgba(6, 10, 20, 0.45);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-top: 0.5px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.28s var(--ease-ios), opacity 0.2s;
}
.shift-nav.is-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}
.shift-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  padding-top: 6px;
  color: rgba(235, 235, 245, 0.45);
}
.shift-nav__item.is-active { color: var(--tint); }
.shift-nav__icon {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
}
.shift-nav__icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.6;
}
.shift-nav__item.is-active .shift-nav__icon svg { stroke-width: 1.85; }
.shift-nav__item small {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: -0.1px;
}

/* Sheet */
.sheet-host {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  justify-content: stretch;
  background: rgba(0, 0, 0, 0.4);
}
.sheet-host.is-open { display: flex; }
.sheet {
  width: 100%;
  max-height: 90dvh;
  padding: 6px 16px calc(12px + var(--safe-bottom));
  border-radius: 28px 28px 0 0;
  background: rgba(16, 24, 42, 0.82);
  backdrop-filter: saturate(200%) blur(40px);
  -webkit-backdrop-filter: saturate(200%) blur(40px);
  border-top: 0.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.35);
  animation: sheetUp 0.35s var(--ease-ios) both;
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}
.sheet__handle {
  width: 36px;
  height: 5px;
  margin: 6px auto 12px;
  border-radius: 3px;
  background: rgba(60, 60, 67, 0.3);
}
.sheet h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  background: var(--bg-elevated);
  font-size: 17px;
}
.toggle {
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: rgba(120, 120, 128, 0.32);
  position: relative;
  transition: background 0.2s;
}
.toggle.is-on { background: var(--ios-green); }
.toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  transition: transform 0.22s var(--ease-ios);
}
.toggle.is-on::after { transform: translateX(20px); }

.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--secondary-label);
  font-size: 15px;
  line-height: 1.4;
}

.toast-host {
  position: fixed;
  z-index: 80;
  left: 50%;
  top: calc(10px + var(--safe-top));
  transform: translateX(-50%);
  width: min(calc(100% - 32px), 340px);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(22, 32, 52, 0.78);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.22s, transform 0.22s var(--ease-ios);
  box-shadow: var(--shadow-glass);
}
.toast.is-show {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
