:root {
  --bg: #14110c;
  --surface: rgba(28, 24, 18, 0.72);
  --surface-2: rgba(40, 34, 26, 0.85);
  --cream: #f3e9d2;
  --cream-soft: #cfc0a0;
  --cream-dim: #a89c84;
  --line: rgba(243, 233, 210, 0.10);
  --line-strong: rgba(243, 233, 210, 0.18);
  --aura-1: rgba(243, 233, 210, 0.16);
  --aura-2: rgba(207, 192, 160, 0.10);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { -webkit-text-size-adjust: 100%; }

body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;

  padding:
    max(28px, env(safe-area-inset-top))
    max(20px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(20px, env(safe-area-inset-left));

  position: relative;
  overflow-x: hidden;
}

.aura {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aura-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  will-change: transform;
}

.aura-orb.o1 {
  width: 80vmin;
  height: 80vmin;
  top: -30vmin;
  right: -25vmin;
  background: radial-gradient(circle, var(--aura-1) 0%, transparent 70%);
  animation: float1 18s ease-in-out infinite;
}

.aura-orb.o2 {
  width: 70vmin;
  height: 70vmin;
  bottom: -28vmin;
  left: -25vmin;
  background: radial-gradient(circle, var(--aura-2) 0%, transparent 70%);
  animation: float2 22s ease-in-out infinite;
}

.aura-orb.o3 {
  width: 50vmin;
  height: 50vmin;
  top: 40%;
  left: 50%;
  margin-top: -25vmin;
  margin-left: -25vmin;
  background: radial-gradient(circle, rgba(243, 233, 210, 0.06) 0%, transparent 70%);
  animation: float3 26s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-6vmin, 6vmin) scale(1.08); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(6vmin, -5vmin) scale(1.06); }
}
@keyframes float3 {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.aura::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.35) 100%
  );
}

.snow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.flake {
  position: absolute;
  top: -8vh;
  color: var(--cream);
  opacity: 0;
  user-select: none;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.flake::before {
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.flake.size-1::before { width: 2px; height: 2px; }
.flake.size-2::before { width: 3px; height: 3px; }
.flake.size-3::before { width: 4px; height: 4px; }

@keyframes fall {
  0% {
    transform: translate3d(0, -10vh, 0) translateX(0);
    opacity: 0;
  }
  10% { opacity: var(--flake-opacity, 0.6); }
  90% { opacity: var(--flake-opacity, 0.6); }
  100% {
    transform: translate3d(var(--drift, 0px), 110vh, 0) translateX(0);
    opacity: 0;
  }
}

.shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;

  opacity: 0;
  transform: translateY(14px);
  animation: reveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--cream) 0%, var(--cream-soft) 100%);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(243, 233, 210, 0.18);
}
.brand-mark span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
}

.brand-name {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cream-soft);
  font-weight: 600;
}

.timeblock {
  text-align: center;
  margin-bottom: 20px;

  opacity: 0;
  transform: translateY(10px);
  animation: reveal 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}

.greeting {
  font-size: clamp(12px, 3.5vw, 13.5px);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin-bottom: 10px;
  font-weight: 500;
}

.clock {
  font-size: clamp(44px, 14vw, 62px);
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--cream);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px rgba(243, 233, 210, 0.14);
}

.clock .sep {
  opacity: 0.35;
  animation: blink 2s steps(1, end) infinite;
}

@keyframes blink {
  0%, 50%   { opacity: 0.35; }
  51%, 100% { opacity: 0.1; }
}

.date {
  margin-top: 10px;
  font-size: clamp(12px, 3.5vw, 13.5px);
  letter-spacing: 1.2px;
  color: var(--cream-dim);
  text-transform: capitalize;
}

.card {
  background-color: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(26px, 7vw, 38px) clamp(20px, 6vw, 32px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(243, 233, 210, 0.05) inset,
    0 24px 70px rgba(0, 0, 0, 0.55);

  opacity: 0;
  transform: translateY(14px);
  animation: reveal 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}

.headline {
  text-align: center;
  margin-bottom: clamp(22px, 6vw, 30px);
}

.headline h1 {
  font-size: clamp(20px, 6vw, 26px);
  font-weight: 600;
  letter-spacing: -0.2px;
  line-height: 1.2;
  color: var(--cream);
  margin-bottom: 8px;
}

.headline p {
  font-size: clamp(12.5px, 3.6vw, 14px);
  line-height: 1.55;
  color: var(--cream-dim);
  font-weight: 400;
  max-width: 30ch;
  margin: 0 auto;
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 0 0 clamp(22px, 6vw, 30px);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 64px;
  padding: 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(14px, 3.9vw, 15.5px);
  font-weight: 600;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  transition:
    transform .18s cubic-bezier(0.22, 1, 0.36, 1),
    background-color .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
  will-change: transform;
}

.btn:active { transform: scale(0.985); }

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.btn-icon svg { width: 19px; height: 19px; }

.btn-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 0;
}
.btn-label {
  font-size: clamp(14px, 3.9vw, 15.5px);
  font-weight: 600;
  line-height: 1.2;
}
.btn-sub {
  font-size: clamp(11px, 3.2vw, 12px);
  font-weight: 400;
  letter-spacing: 0.2px;
  opacity: 0.66;
  line-height: 1.3;
}

.btn-arrow {
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform .2s ease, opacity .2s ease;
}
.btn-arrow svg { width: 16px; height: 16px; display: block; }

.btn-primary {
  background: linear-gradient(180deg, #f6eeda 0%, #e9dbbc 100%);
  color: #12100c;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 10px 26px rgba(243, 233, 210, 0.16);
}
.btn-primary .btn-icon {
  background: rgba(18, 16, 12, 0.10);
  color: #12100c;
}
.btn-primary .btn-sub { color: #12100c; }

.btn-secondary {
  background: var(--surface-2);
  color: var(--cream);
  border-color: var(--line-strong);
}
.btn-secondary .btn-icon {
  background: rgba(243, 233, 210, 0.07);
  color: var(--cream);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: linear-gradient(180deg, #fbf4e3 0%, #efe2c5 100%);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.6) inset,
      0 14px 34px rgba(243, 233, 210, 0.24);
  }
  .btn-secondary:hover {
    background: rgba(52, 44, 34, 0.9);
    border-color: rgba(243, 233, 210, 0.30);
  }
  .btn:hover .btn-arrow {
    transform: translateX(3px);
    opacity: 0.9;
  }
}

.foot {
  margin-top: 20px;
  text-align: center;
  font-size: clamp(10.5px, 3vw, 11.5px);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--cream-dim);
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .shell, .timeblock, .card {
    opacity: 1;
    transform: none;
  }
}

.install-popup {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.install-popup.is-visible {
  opacity: 1;
  visibility: visible;
}

.install-card {
  width: 100%;
  max-width: 400px;
  background-color: #1a160f;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  padding: 24px 22px 20px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);

  transform: translateY(16px);
  transition: transform .32s cubic-bezier(0.22, 1, 0.36, 1);
}

.install-popup.is-visible .install-card {
  transform: translateY(0);
}

.install-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 14px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--cream) 0%, var(--cream-soft) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(243, 233, 210, 0.18);
}
.install-icon span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
}

.install-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 6px;
}

.install-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--cream-dim);
  margin-bottom: 18px;
}

.install-actions {
  display: flex;
  gap: 10px;
}

.install-btn {
  flex: 1;
  min-height: 46px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .16s ease, background-color .2s ease, border-color .2s ease;
}

.install-btn:active { transform: scale(0.97); }

.install-btn-primary {
  background: linear-gradient(180deg, #f6eeda 0%, #e9dbbc 100%);
  color: #12100c;
  box-shadow: 0 6px 18px rgba(243, 233, 210, 0.18);
}

.install-btn-ghost {
  background: transparent;
  color: var(--cream-soft);
  border-color: var(--line-strong);
}
.install-btn-ghost:hover {
  background: rgba(243, 233, 210, 0.06);
  border-color: rgba(243, 233, 210, 0.30);
}

@media (hover: hover) {
  .install-btn-primary:hover {
    background: linear-gradient(180deg, #fbf4e3 0%, #efe2c5 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .install-popup,
  .install-card {
    transition: none;
  }
}