﻿:root {
  --bg: #fff1f5;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #251019;
  --muted: #7a5262;
  --accent: #ff4f8b;
  --accent-strong: #ec2f64;
  --coral: #ff7a59;
  --peach: #ffd0bd;
  --rose: #fff6f8;
  --line: rgba(236, 47, 100, 0.18);
  --error: #b42318;
  --success: #087443;
  --ring: rgba(255, 79, 139, 0.34);
  --shadow: 0 34px 90px rgba(164, 38, 83, 0.24);
  color-scheme: light;
  font-family: Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 14% 8%, rgba(255, 79, 139, 0.45), transparent 22rem),
    radial-gradient(circle at 90% 18%, rgba(255, 122, 89, 0.36), transparent 24rem),
    radial-gradient(circle at 50% 100%, rgba(255, 208, 189, 0.75), transparent 22rem),
    linear-gradient(145deg, #fff6f8 0%, #ffe6ef 46%, #ffd8cb 100%);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: '';
  background-image:
    linear-gradient(rgba(236, 47, 100, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(236, 47, 100, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

button,
summary {
  font: inherit;
}

.shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 14px;
}

.card {
  width: min(100%, 500px);
  padding: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise-in 520ms ease both;
}

.topbar,
.brand-lockup,
.history-meta,
.secondary-actions {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 14px;
}

.brand-lockup {
  min-width: 0;
  gap: 10px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(236, 47, 100, 0.28));
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.language-switcher {
  display: flex;
  flex: 0 0 auto;
  padding: 4px;
  background: rgba(255, 79, 139, 0.12);
  border: 1px solid rgba(255, 79, 139, 0.14);
  border-radius: 999px;
}

.lang-button {
  min-width: 42px;
  padding: 8px 10px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.lang-button.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.hero-copy {
  margin-top: 30px;
}

h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.85rem, 14vw, 5.6rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.08em;
}

.subtitle {
  max-width: 26rem;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.window-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: center;
  margin: 24px 0 12px;
  padding: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 96% 8%, rgba(255, 79, 139, 0.18), transparent 8rem),
    rgba(255, 246, 248, 0.9);
  border: 1px solid var(--line);
  border-radius: 22px;
}

.window-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  color: #ffffff;
  background: var(--muted);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.window-panel.is-open .window-pill {
  background: var(--success);
}

.window-panel.is-closed .window-pill {
  background: var(--accent-strong);
}

.countdown-wrap {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.countdown-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.countdown-text {
  width: fit-content;
  padding: 8px 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(236, 47, 100, 0.14);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(236, 47, 100, 0.12);
  font-family: 'Courier New', Courier, monospace;
  font-size: clamp(1.35rem, 7vw, 2rem);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.08em;
  line-height: 1;
}

.countdown-text.is-ticking {
  animation: timer-tick 360ms ease;
}

.countdown-progress {
  height: 7px;
  overflow: hidden;
  background: rgba(236, 47, 100, 0.12);
  border-radius: 999px;
}

.countdown-progress span {
  display: block;
  width: 4%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--coral));
  border-radius: inherit;
  transition: width 500ms ease;
}

.window-help {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.counter-panel {
  position: relative;
  margin: 0 0 14px;
  padding: 22px;
  overflow: hidden;
  color: #fffafc;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 208, 189, 0.6), transparent 9rem),
    linear-gradient(150deg, #ff4f8b 0%, #ec2f64 52%, #ff7a59 100%);
  border-radius: 26px;
  box-shadow: 0 18px 42px rgba(236, 47, 100, 0.28);
}

.counter-panel::after {
  position: absolute;
  right: -34px;
  bottom: -54px;
  width: 160px;
  height: 160px;
  content: '';
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 68%);
}

.counter-label,
.counter-status {
  position: relative;
  z-index: 1;
  display: block;
}

.counter-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.counter-number {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  font-size: clamp(4.7rem, 26vw, 8rem);
  font-weight: 900;
  line-height: 0.86;
  letter-spacing: -0.09em;
}

.counter-status {
  min-height: 1.3em;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 700;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}

.stat-card,
.area-panel,
.history-panel,
.privacy-panel {
  background: rgba(255, 246, 248, 0.86);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.area-panel {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  margin: 0 0 12px;
  padding: 14px;
}

.area-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.route-line {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-line i {
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--coral));
  border-radius: 999px;
}

.route-line span {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 4px solid var(--accent-strong);
  border-radius: 999px;
}

.history-panel,
.privacy-panel {
  margin: 0 0 12px;
  padding: 0;
}

.history-panel summary,
.privacy-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  list-style: none;
}

.history-panel summary::-webkit-details-marker,
.privacy-panel summary::-webkit-details-marker {
  display: none;
}

.history-panel summary::after,
.privacy-panel summary::after {
  content: '+';
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 900;
}

.history-panel[open] summary::after,
.privacy-panel[open] summary::after {
  content: '-';
}

.history-panel small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.history-row,
.history-empty {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.history-meta {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.history-meta strong {
  color: var(--accent-strong);
  font-weight: 900;
  white-space: nowrap;
}

.history-bar {
  height: 9px;
  overflow: hidden;
  background: rgba(236, 47, 100, 0.12);
  border-radius: 999px;
}

.history-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--coral));
  border-radius: inherit;
}

.turnstile-box {
  display: grid;
  min-height: 70px;
  place-items: center;
  margin: 14px 0 10px;
}

.turnstile-box.is-hidden {
  display: none;
}

.checkin-button,
.share-button {
  width: 100%;
  border: 0;
  border-radius: 22px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.checkin-button {
  min-height: 64px;
  padding: 18px 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 52%, var(--coral) 100%);
  box-shadow: 0 18px 38px rgba(236, 47, 100, 0.32);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.share-button {
  min-height: 48px;
  padding: 13px 16px;
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  font-size: 0.94rem;
}

.secondary-actions {
  justify-content: center;
  margin-top: 10px;
}

.checkin-button:focus-visible,
.share-button:focus-visible,
.lang-button:focus-visible,
summary:focus-visible {
  outline: 4px solid var(--ring);
  outline-offset: 3px;
}

.checkin-button:active,
.share-button:active {
  transform: translateY(1px) scale(0.99);
}

.checkin-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: none;
}

.message {
  min-height: 1.5em;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.message.is-error {
  color: var(--error);
}

.message.is-success {
  color: var(--success);
}

.privacy-panel {
  margin-top: 16px;
}

.privacy-grid {
  display: grid;
  gap: 12px;
  padding: 0 16px 0;
}

.privacy-grid div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(236, 47, 100, 0.12);
  border-radius: 16px;
}

.privacy-grid strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  margin-bottom: 8px;
}

.privacy-grid ul {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  list-style: none;
}

.privacy-grid li::before {
  content: '• ';
  color: var(--accent-strong);
}

.privacy-panel p {
  margin: 0;
  padding: 14px 16px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.5;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes timer-tick {
  0% {
    transform: translateY(0) scale(1);
  }

  45% {
    color: var(--accent-strong);
    transform: translateY(-1px) scale(1.035);
  }

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

@media (min-width: 720px) {
  .shell {
    padding: 28px;
  }

  .card {
    padding: 32px;
  }

  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .privacy-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
