@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --bg: #0b0b0f;
  --surface-1: #12121a;
  --surface-2: #171726;
  --border: rgba(255, 255, 255, 0.08);
  --text: rgba(255, 255, 255, 0.92);
  --text-muted: rgba(255, 255, 255, 0.68);
  --text-faint: rgba(255, 255, 255, 0.48);
  --accent: #c1121f;
  --accent-hover: #d11423;
  --accent-active: #a60f1a;
  --accent-weak: rgba(193, 18, 31, 0.18);
  --success: #2ecc71;
  --warning: #f4c430;
  --danger: #ff4d4d;
  --info: #4d9dff;
  --shadow-1: 0 6px 22px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 10px 40px rgba(0, 0, 0, 0.45);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-ui: "Inter", "SF Pro Text", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  color: var(--text);
  background:
    radial-gradient(800px circle at 15% 15%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(900px circle at 80% 10%, rgba(255, 255, 255, 0.03), transparent 55%),
    var(--bg);
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
}

.bg__glow {
  position: absolute;
  border-radius: 50%;
  opacity: 0.25;
  filter: blur(0);
  animation: float 18s var(--ease) infinite;
}

.bg__glow--a {
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 70%);
  top: -120px;
  left: -80px;
}

.bg__glow--b {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.06), transparent 70%);
  bottom: -160px;
  right: -120px;
  animation-delay: -5s;
}

.bg__glow--c {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.04), transparent 70%);
  top: 35%;
  right: 10%;
  animation-delay: -8s;
}

.bg__grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' seed='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
  opacity: 0.5;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 16px 64px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  animation: reveal 0.24s var(--ease);
}

.brand__mark {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.brand__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-faint);
}

.brand__est {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.panel {
  background: var(--surface-1);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  animation: reveal 0.28s var(--ease);
}

.panel h1,
.panel h2,
.panel h3 {
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel h1 {
  font-size: 30px;
}

.panel h2 {
  font-size: 22px;
}

.panel h3 {
  font-size: 18px;
}

.panel p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

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

.actions .fineprint {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
  margin-top: 4px;
}

.actions .fineprint strong {
  color: var(--text-muted);
  font-weight: 600;
}

.actions--footer {
  margin-top: auto;
  padding-top: 16px;
}

button,
.button {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  background: transparent;
  transition: all 160ms var(--ease);
}

button.primary,
.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(193, 18, 31, 0.25);
}

button.primary:hover {
  background: var(--accent-hover);
}

button.primary:active {
  background: var(--accent-active);
}

button.secondary,
.button.secondary {
  background: var(--surface-2);
  border-color: var(--border);
}

button.secondary:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

button.ghost,
.button.ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text-muted);
}

button.ghost:hover {
  color: var(--text);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

button:focus-visible {
  outline: 2px solid var(--accent-weak);
  outline-offset: 2px;
}

.grid {
  display: grid;
  gap: 18px;
}

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.intro {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.intro__eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.intro__lead {
  margin: 0;
  color: var(--text-muted);
}

.establishment-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.establishment-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 48px 16px 16px;
  text-align: left;
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  gap: 6px;
  position: relative;
  height: auto;
  min-height: 72px;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}

.establishment-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.establishment-card:active {
  transform: translateY(0);
}

.establishment-card__title {
  font-size: 16px;
  font-weight: 600;
}

.establishment-card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.establishment-card__chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-faint);
}

.card {
  position: relative;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 250px;
  animation: card-fade 0.14s var(--ease);
}

.card--bold {
  background:
    linear-gradient(135deg, var(--accent-weak), rgba(18, 18, 26, 0) 55%),
    var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--accent-weak);
}

.card--bold::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0.7;
}

.card__meta {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}

.card__title {
  font-size: 20px;
  font-weight: 600;
}

.card__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card__reason {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-muted);
}

.pill--bold {
  background: var(--accent-weak);
  color: #fff;
  border: 1px solid rgba(193, 18, 31, 0.4);
}

.slider {
  display: grid;
  gap: 6px;
}

.slider__label {
  font-weight: 500;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.slider__axis {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.slider__axis-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.slider__axis-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.slider__axis-title {
  color: var(--text);
  font-weight: 600;
}

.slider__axis-caption {
  font-size: 11px;
  color: var(--text-faint);
}

.slider__axis-range {
  font-size: 11px;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.slider__value {
  font-variant-numeric: tabular-nums;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  opacity: 0;
  transition:
    opacity 160ms var(--ease),
    background 160ms var(--ease),
    color 160ms var(--ease);
}

.slider__value.is-active {
  opacity: 1;
  background: var(--accent-weak);
  color: var(--text);
}

.slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.rating {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rating button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
}

.rating button.is-active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
}

.tag.is-selected {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent-weak);
}

.field {
  display: grid;
  gap: 8px;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--surface-1);
  color: var(--text);
  font-family: var(--font-ui);
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.notice input {
  accent-color: var(--accent);
}

.optional-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.status {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.status--error {
  border-color: rgba(255, 77, 77, 0.4);
  background: rgba(255, 77, 77, 0.08);
  color: var(--text);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.08) 45%, transparent 70%);
  transform: translateX(-100%);
  animation: shimmer 1.6s var(--ease) infinite;
}

.skeleton-line {
  height: 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.skeleton-line--title {
  height: 18px;
  margin-bottom: 14px;
}

.skeleton-card {
  min-height: 240px;
  padding: 18px;
  border-radius: var(--radius-md);
}

.skeleton-stack {
  display: grid;
  gap: 12px;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes card-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.overlay .panel {
  max-width: 520px;
  width: min(90vw, 520px);
  background: var(--surface-2);
  box-shadow: var(--shadow-2);
  max-height: 85vh;
  overflow-y: auto;
}

.hidden {
  display: none;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@media (max-width: 720px) {
  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand__meta {
    text-align: left;
  }

  .panel {
    padding: 22px;
    min-height: calc(100vh - 150px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
  }

  .panel h1 {
    font-size: 26px;
  }

  .panel h2 {
    font-size: 20px;
  }

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

  .actions {
    flex-direction: column;
    align-items: stretch;
  }

  .actions button,
  .actions .button {
    width: 100%;
  }

  .actions--footer {
    position: sticky;
    bottom: 12px;
    background: linear-gradient(
      180deg,
      rgba(18, 18, 26, 0) 0%,
      rgba(18, 18, 26, 0.92) 40%,
      rgba(18, 18, 26, 0.98) 100%
    );
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  .overlay {
    align-items: flex-end;
  }

  .overlay .panel {
    width: 100%;
    min-height: auto;
    display: block;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
}

@media (max-width: 480px) {
  .shell {
    padding: 28px 16px 48px;
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }

  .brand__mark {
    font-size: 22px;
  }

  .brand__est {
    font-size: 15px;
  }

  .panel {
    padding: 18px;
  }

  .card {
    min-height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
