:root {
  --bg: #120c0a;
  --bg-2: #1b120f;
  --panel: rgba(30, 20, 16, 0.9);
  --panel-strong: rgba(38, 25, 20, 0.96);
  --text: #f8ede2;
  --muted: #cfb8a7;
  --line: rgba(255, 255, 255, 0.1);
  --brand: #dc8f52;
  --brand-2: #f5c28e;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 34px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Bricolage Grotesque", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 20%, rgba(220, 143, 82, 0.16), transparent 24%),
    radial-gradient(circle at 82% 14%, rgba(245, 194, 142, 0.08), transparent 22%),
    linear-gradient(180deg, #100907 0%, #18100d 48%, #211512 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 999px;
  filter: blur(30px);
  pointer-events: none;
}

body::before {
  top: 8vh;
  right: -120px;
  width: 320px;
  height: 320px;
  background: rgba(245, 194, 142, 0.08);
}

body::after {
  left: -140px;
  bottom: 10vh;
  width: 360px;
  height: 360px;
  background: rgba(220, 143, 82, 0.08);
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 32px), 1120px);
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 0 calc(40px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(24, 16, 13, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 0 0 1px rgba(220, 143, 82, 0.06), 0 22px 60px rgba(0, 0, 0, 0.35);
  position: sticky;
  top: 14px;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5f3827 0%, #dc8f52 54%, #f5c28e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 0 18px rgba(0, 0, 0, 0.28);
  font-size: 24px;
}

.brand small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
}

.brand strong {
  display: block;
  font-size: 1.08rem;
}

.topbar-link {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.topbar-link:hover,
.topbar-link:focus-visible {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.1);
  color: var(--text);
  outline: none;
}

.maintenance-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(245, 194, 142, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.maintenance-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 28%, transparent 72%, rgba(245, 194, 142, 0.04) 100%);
  pointer-events: none;
}

.maintenance-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.82fr);
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,0.08);
}

.maintenance-copy h1 {
  margin: 16px 0 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.maintenance-copy p {
  margin: 16px 0 0;
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.72;
  font-size: 1rem;
}

.status-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  position: relative;
  padding: 12px 14px 12px 38px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  color: #ead9cb;
  line-height: 1.45;
}

.status-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 5px rgba(220, 143, 82, 0.12);
}

.maintenance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.btn--primary {
  color: #fff8f2;
  background: linear-gradient(135deg, #5f3827 0%, #dc8f52 48%, #f5c28e 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

.hourglass-card {
  position: relative;
  padding: 28px 24px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top, rgba(245, 194, 142, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    var(--panel-strong);
  box-shadow: 0 22px 48px rgba(0,0,0,0.28);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.hourglass-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.hourglass {
  position: relative;
  width: 170px;
  height: 210px;
  animation: floatGlass 3.4s ease-in-out infinite;
}

.hourglass-frame {
  position: absolute;
  inset: 0;
  border-radius: 36px;
  border: 6px solid rgba(244, 224, 203, 0.88);
  clip-path: polygon(28% 6%, 72% 6%, 58% 44%, 72% 94%, 28% 94%, 42% 44%);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06), inset 0 0 30px rgba(245, 194, 142, 0.08);
}

.hourglass-neck {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 14px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(248, 237, 226, 0.88);
}

.hourglass-top,
.hourglass-bottom {
  position: absolute;
  left: 50%;
  width: 90px;
  overflow: hidden;
  transform: translateX(-50%);
}

.hourglass-top {
  top: 28px;
  height: 70px;
  clip-path: polygon(0 0, 100% 0, 58% 100%, 42% 100%);
}

.hourglass-bottom {
  bottom: 28px;
  height: 74px;
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
}

.sand-top,
.sand-bottom {
  position: absolute;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #f6d4ab 0%, #dc8f52 100%);
}

.sand-top {
  bottom: 0;
  height: 100%;
  transform-origin: center bottom;
  animation: sandTop 4s linear infinite;
}

.sand-bottom {
  bottom: 0;
  height: 0%;
  border-radius: 50% 50% 18% 18% / 36% 36% 16% 16%;
  animation: sandBottom 4s linear infinite;
}

.sand-stream {
  position: absolute;
  left: 50%;
  top: 82px;
  width: 8px;
  height: 62px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(245, 194, 142, 0), #f5c28e 22%, #dc8f52 78%, rgba(220, 143, 82, 0));
  animation: sandStream 4s linear infinite;
}

.waiting-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: #f3d2b3;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

footer {
  padding: 16px 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

@keyframes sandTop {
  0%,
  10% {
    transform: scaleY(1);
  }
  85%,
  100% {
    transform: scaleY(0.12);
  }
}

@keyframes sandBottom {
  0%,
  10% {
    height: 8%;
  }
  85%,
  100% {
    height: 86%;
  }
}

@keyframes sandStream {
  0%,
  12% {
    opacity: 0;
  }
  18%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes floatGlass {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 920px) {
  .maintenance-grid {
    grid-template-columns: 1fr;
  }

  .hourglass-card {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(calc(100% - 20px), 1120px);
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .topbar {
    padding: 14px;
    border-radius: 24px;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar-link {
    width: 100%;
    min-height: 46px;
  }

  .maintenance-panel {
    padding: 22px 18px;
    border-radius: 26px;
  }

  .maintenance-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    min-height: 48px;
  }

  .hourglass {
    width: 142px;
    height: 184px;
  }

  .hourglass-top,
  .hourglass-bottom {
    width: 76px;
  }

  .hourglass-top {
    top: 24px;
    height: 60px;
  }

  .hourglass-bottom {
    bottom: 24px;
    height: 62px;
  }

  .sand-stream {
    top: 72px;
    height: 54px;
  }

  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
