@font-face {
  font-family: "Berlin Sans";
  src: url("./assets/fonts/berlin-sans-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Berlin Sans";
  src: url("./assets/fonts/berlin-sans-demi.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Berlin Sans";
  src: url("./assets/fonts/berlin-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #221514;
  --espresso: #3b2118;
  --mocha: #6a3a27;
  --cedar: #8a5336;
  --sand: #d9c2af;
  --cream: #f6ede5;
  --latte: #e6d3c5;
  --success: #6fa66b;
  --line: rgba(246, 237, 229, 0.14);
  --shadow: rgba(0, 0, 0, 0.24);
  --bg-overlay: rgba(34, 21, 20, 0.58);
  --footer-safe: max(16px, env(safe-area-inset-bottom));
  --top-safe: max(16px, env(safe-area-inset-top));
  --page-max: 460px;
  --card-radius: 28px;
  --media-radius: 24px;
  --screen-pad: 24px;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--espresso);
}

body {
  font-family: "Berlin Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--cream);
  background-image:
    linear-gradient(var(--bg-overlay), var(--bg-overlay)),
    url("./assets/Tirana%20Contour%20Lines.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.app-shell {
  min-height: 100vh;
}

.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen-scroll {
  width: min(100%, calc(var(--page-max) + (var(--screen-pad) * 2)));
  margin: 0 auto;
  padding: calc(var(--top-safe) + 20px) var(--screen-pad) calc(136px + var(--footer-safe));
}

.home-screen .screen-scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.logo-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--cream);
  border: 1px solid rgba(246, 237, 229, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.logo-mark img {
  width: 34px;
  height: 34px;
}

.logo-wordmark {
  display: grid;
  gap: 2px;
}

.logo-title {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.8px;
}

.logo-subtitle {
  color: var(--sand);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.6px;
}

.screen-title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
}

.panel-card {
  width: 100%;
  border-radius: 34px;
  padding: 24px;
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid var(--line);
  box-shadow: 0 18px 24px var(--shadow);
}

.panel-heading {
  margin: 0 0 20px;
  font-size: 18px;
  font-weight: 600;
}

.stack {
  display: grid;
  gap: 16px;
}

.event-card,
.category-card,
.item-card,
.footer-button,
.modal-button {
  transition:
    transform var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    opacity var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.event-card {
  border-radius: var(--card-radius);
  padding: 16px;
  background: rgba(34, 21, 20, 0.62);
  border: 1px solid rgba(246, 237, 229, 0.12);
  color: inherit;
}

.event-card:active,
.category-card:active,
.item-card:active,
.footer-button:active,
.modal-button:active {
  transform: scale(0.99);
}

.event-card.is-unavailable {
  opacity: 0.7;
  background: rgba(34, 21, 20, 0.42);
  border-color: rgba(246, 237, 229, 0.07);
  cursor: default;
}

.event-media {
  position: relative;
  height: 116px;
  overflow: hidden;
  border-radius: 22px;
  margin-bottom: 16px;
  border: 1px solid rgba(246, 237, 229, 0.05);
  background: rgba(246, 237, 229, 0.05);
}

.event-media img {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  object-fit: cover;
}

.event-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(34, 21, 20, 0.12);
}

.event-card.is-unavailable .event-media::after {
  background: rgba(34, 21, 20, 0.34);
}

.event-copy {
  display: grid;
  gap: 6px;
}

.event-title-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.event-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.event-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--sand);
}

.soon-pill {
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.header-wrap {
  margin-bottom: 24px;
}

.header-wrap .logo-lockup {
  margin-bottom: 20px;
}

.summary-card {
  margin-bottom: 20px;
  border-radius: 22px;
  padding: 20px;
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid var(--line);
}

.summary-label {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
}

.summary-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(246, 237, 229, 0.12);
}

.summary-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--sand);
  transition: width 220ms ease;
}

.status-text {
  margin: 0 0 16px;
  text-align: center;
  font-size: 14px;
  color: var(--sand);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.category-card,
.item-card {
  position: relative;
  border-radius: var(--card-radius);
  padding: 16px;
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid rgba(246, 237, 229, 0.14);
  color: inherit;
}

.category-card.is-complete,
.item-card.is-complete {
  opacity: 0.5;
  background: rgba(246, 237, 229, 0.04);
  border-color: rgba(111, 166, 107, 0.32);
}

.card-media-wrap {
  position: relative;
  margin-bottom: 16px;
}

.card-media {
  position: relative;
  height: 122px;
  border-radius: var(--media-radius);
  overflow: hidden;
  border: 1px solid rgba(246, 237, 229, 0.05);
  background: rgba(246, 237, 229, 0.05);
  display: grid;
  place-items: center;
}

.category-card .card-media {
  height: 120px;
}

.card-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(49, 32, 29, 0.08);
}

.card-media img {
  position: relative;
  z-index: 1;
  max-width: 96%;
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.category-card .card-media img {
  max-width: 94%;
  max-height: 86%;
}

.card-title {
  margin: 0;
  text-align: center;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 600;
}

.category-card .card-title {
  font-size: 18px;
}

.check-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  background: var(--success);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.check-badge::before,
.check-badge::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: #fff;
}

.check-badge::before {
  width: 7px;
  height: 4px;
  left: 9px;
  top: 17px;
  transform: rotate(45deg);
}

.check-badge::after {
  width: 12px;
  height: 4px;
  left: 13px;
  top: 14px;
  transform: rotate(-45deg);
}

.screen-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: rgba(34, 21, 20, 0.9);
  border-top: 1px solid var(--line);
}

.screen-footer-inner {
  width: min(100%, calc(var(--page-max) + (var(--screen-pad) * 2)));
  margin: 0 auto;
  display: grid;
  gap: 16px;
  padding: 20px 24px var(--footer-safe);
}

.footer-row {
  grid-template-columns: 1fr 1.4fr;
}

.footer-button {
  min-height: 60px;
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 18px;
  font-weight: 600;
}

.footer-button.back {
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid var(--line);
  color: var(--cream);
}

.footer-button.primary,
.modal-button.primary,
.overlay-reset-button {
  background: var(--mocha);
  color: var(--cream);
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.52);
}

.overlay.celebration {
  background: rgba(11, 9, 8, 0.76);
}

.overlay-card {
  width: min(100%, 380px);
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: 32px 24px;
  border: 1px solid rgba(246, 237, 229, 0.16);
  background: rgba(34, 21, 20, 0.86);
  text-align: center;
}

.overlay-card.success {
  min-height: 360px;
  display: grid;
  place-items: center;
}

.overlay-card.final {
  min-height: 420px;
}

.success-ring {
  position: absolute;
  width: 168px;
  height: 168px;
  border-radius: 999px;
  border: 1.5px solid rgba(217, 194, 175, 0.42);
  animation: ring-bloom 1s ease-out forwards;
}

.particle-field {
  position: absolute;
  width: 320px;
  height: 320px;
  pointer-events: none;
}

.particle {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: var(--sand);
  opacity: 0;
  animation: particle-burst 1.6s ease-out infinite;
  animation-delay: var(--delay, 0s);
}

.success-badge {
  position: relative;
  z-index: 1;
  width: 112px;
  height: 112px;
  margin: 0 auto 24px;
  border-radius: 56px;
  display: grid;
  place-items: center;
  background: rgba(217, 194, 175, 0.14);
  border: 1px solid rgba(217, 194, 175, 0.26);
  transform: scale(0.86);
  opacity: 0;
  animation: badge-in 420ms ease-out forwards;
}

.success-badge img {
  width: var(--badge-size, 84px);
  height: var(--badge-size, 84px);
  object-fit: contain;
}

.success-title {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 42px;
  line-height: 1.1;
  font-weight: 700;
}

.success-body {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 280px;
  justify-self: center;
  color: var(--latte);
  font-size: 17px;
  line-height: 1.45;
}

.overlay-actions {
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 32px;
  opacity: 0;
  transform: translateY(12px);
  animation: delayed-cta 700ms ease-out forwards;
  animation-delay: 4s;
}

.overlay-reset-button {
  width: 100%;
  min-height: 60px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
}

.modal-card {
  width: min(100%, 360px);
  border-radius: 28px;
  padding: 24px;
  background: var(--ink);
  border: 1px solid var(--line);
  text-align: center;
}

.modal-title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
}

.modal-body {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--latte);
}

.modal-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.modal-button {
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 600;
}

.modal-button.secondary {
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid var(--line);
  color: var(--cream);
}

.install-hint {
  margin: 18px 0 0;
  text-align: center;
  color: var(--sand);
  font-size: 13px;
}

.install-button {
  width: 100%;
  margin-top: 18px;
  min-height: 52px;
  border-radius: 18px;
  background: rgba(246, 237, 229, 0.08);
  border: 1px solid var(--line);
  color: var(--cream);
  font-size: 16px;
  font-weight: 600;
}

.desktop-note {
  margin: 12px 0 0;
  text-align: center;
  color: rgba(230, 211, 197, 0.88);
  font-size: 13px;
}

@keyframes badge-in {
  from {
    opacity: 0;
    transform: scale(0.86);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ring-bloom {
  0% {
    opacity: 1;
    transform: scale(0.4);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.14);
  }
}

@keyframes particle-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  10% {
    opacity: 1;
  }
  75% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.1);
  }
}

@keyframes delayed-cta {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 420px) {
  :root {
    --screen-pad: 18px;
  }

  .screen-title {
    font-size: 30px;
  }

  .category-card .card-title {
    font-size: 17px;
  }
}
