:root {
  --ink: #191a17;
  --muted: #74756e;
  --paper: #f2f0ea;
  --panel: #faf9f6;
  --white: #fff;
  --line: #dfddd4;
  --acid: #dfff43;
  --acid-strong: #d3f72c;
  --rose: #ff5f78;
  --blue: #6987ff;
  --shadow: 0 24px 70px rgba(26, 27, 23, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

body.auth-locked {
  overflow: hidden;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(204, 236, 48, 0.55);
  outline-offset: 2px;
}

.auth-gate {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(390px, 0.92fr);
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.auth-gate.open {
  opacity: 1;
  pointer-events: auto;
}

.auth-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 34px 42px;
  background:
    linear-gradient(125deg, rgba(18, 19, 16, 0.96), rgba(18, 19, 16, 0.55)),
    url("./assets/riverbank.jpg") center / cover;
  color: #fff;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -170px;
  bottom: -210px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: var(--acid);
  opacity: 0.92;
  filter: blur(1px);
}

.auth-brand {
  position: relative;
  z-index: 2;
  padding: 0;
}

.auth-promise {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 42px;
  width: min(620px, calc(100% - 84px));
  transform: translateY(-54%);
}

.auth-promise .eyebrow {
  color: rgba(255, 255, 255, 0.64);
}

.auth-promise h1 {
  margin-top: 18px;
  font-size: clamp(45px, 5vw, 72px);
  line-height: 0.94;
}

.auth-promise p {
  max-width: 470px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  line-height: 1.65;
}

.auth-preview-card {
  position: absolute;
  z-index: 3;
  right: 42px;
  bottom: 36px;
  width: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 17px;
  background: rgba(20, 21, 18, 0.75);
  box-shadow: var(--shadow);
  transform: rotate(3deg);
  backdrop-filter: blur(12px);
}

.auth-preview-card img {
  width: 100%;
  height: 105px;
  display: block;
  object-fit: cover;
}

.auth-preview-card span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px;
  font-size: 8px;
  font-weight: 750;
}

.auth-preview-card svg {
  width: 13px;
  color: var(--acid);
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 36px;
  overflow-y: auto;
  background: var(--panel);
}

.auth-box {
  width: min(390px, 100%);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 31px;
  padding: 4px;
  border-radius: 13px;
  background: #e9e7e0;
}

.auth-tabs button {
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(25, 26, 22, 0.08);
}

.auth-heading {
  margin-bottom: 21px;
}

.auth-heading h2 {
  margin: 10px 0 8px;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.auth-form.active {
  display: flex;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #5f6059;
  font-size: 9px;
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 44px;
}

.password-field button {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.password-field svg {
  width: 16px;
}

.terms-check {
  display: grid !important;
  grid-template-columns: 17px 1fr;
  align-items: start;
  gap: 9px !important;
  font-weight: 500 !important;
  line-height: 1.45;
  cursor: pointer;
}

.terms-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--ink);
}

.auth-submit {
  height: 47px;
  margin-top: 2px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(25, 26, 22, 0.16);
}

.auth-submit:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.auth-text-button,
.auth-back {
  align-self: center;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.auth-back {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.auth-back svg {
  width: 12px;
}

.auth-message {
  margin-bottom: 17px;
  padding: 12px 13px;
  border: 1px solid #d8d5cc;
  border-radius: 11px;
  background: #efede7;
  color: #5e5f59;
  font-size: 9px;
  line-height: 1.5;
}

.auth-message.error {
  border-color: #f0b8bd;
  background: #fff0f1;
  color: #9c3440;
}

.auth-message.success {
  border-color: #c9df4b;
  background: #f2fac8;
  color: #59641e;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 100;
  inset: 0 auto 0 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  padding: 25px 18px 18px;
  background: #1a1b18;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.06em;
  cursor: pointer;
}

.brand-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--acid);
  color: var(--ink);
  transform: rotate(-6deg);
}

.brand-symbol svg {
  width: 18px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 42px;
}

.side-link {
  height: 47px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: #989a92;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}

.side-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.side-link.active {
  color: var(--ink);
  background: var(--acid);
}

.side-link svg {
  width: 18px;
}

.nav-count {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin-left: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 9px;
}

.side-link.active .nav-count {
  background: var(--ink);
}

.creator-card {
  margin-top: auto;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: linear-gradient(145deg, #2b2c27, #20211e);
}

.creator-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.creator-icon svg {
  width: 17px;
}

.creator-card b {
  display: block;
  font-size: 12px;
}

.creator-card p {
  margin: 7px 0 13px;
  color: #9d9e98;
  font-size: 9.5px;
  line-height: 1.5;
}

.creator-card button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--acid);
  background: transparent;
  color: var(--acid);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 11px 8px 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.avatar,
.mobile-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d8cfff;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
}

.sidebar-profile > span:nth-child(2) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.sidebar-profile b {
  font-size: 10px;
}

.sidebar-profile small {
  color: #85867f;
  font-size: 8px;
}

.sidebar-profile svg {
  width: 14px;
  color: #777872;
}

.workspace {
  min-width: 0;
  grid-column: 2;
}

.mobile-header,
.mobile-nav {
  display: none;
}

.view {
  display: none;
  min-height: 100vh;
}

.view.active {
  display: block;
}

.view-header {
  width: min(1100px, calc(100% - 70px));
  margin: 0 auto;
  padding: 31px 0 17px;
}

.discover-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  color: #898a83;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 13px 0 0;
  font-size: clamp(39px, 3.7vw, 51px);
  line-height: 0.97;
  font-weight: 850;
  letter-spacing: -0.06em;
}

.view-header > div > p,
.profile-person p {
  max-width: 540px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.header-tools {
  display: flex;
  gap: 8px;
}

.city-selector,
.round-tool {
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.city-selector {
  padding: 0 14px;
}

.city-selector svg {
  width: 14px;
}

.city-selector svg:last-child {
  width: 12px;
  color: var(--muted);
}

.round-tool {
  width: 43px;
}

.round-tool svg {
  width: 16px;
}

.discover-layout {
  width: min(1100px, calc(100% - 70px));
  display: grid;
  grid-template-columns: minmax(430px, 650px) minmax(235px, 300px);
  align-items: center;
  justify-content: center;
  gap: clamp(40px, 6vw, 90px);
  margin: 0 auto;
  padding: 3px 0 36px;
}

.deck-zone {
  min-width: 0;
}

.deck {
  position: relative;
  width: min(100%, 540px);
  height: min(62vh, 590px);
  min-height: 420px;
  margin: 0 auto;
  perspective: 1100px;
}

.location-swipe-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 27px;
  background: #c9c7c0;
  box-shadow: var(--shadow);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform-origin: 50% 100%;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.25, 1),
    opacity 0.3s ease;
}

.location-swipe-card:active {
  cursor: grabbing;
}

.location-swipe-card:nth-last-child(2) {
  transform: translateY(12px) scale(0.965) rotate(-1deg);
}

.location-swipe-card:nth-last-child(3) {
  transform: translateY(23px) scale(0.93) rotate(1.2deg);
}

.location-swipe-card:not(:nth-last-child(-n + 3)) {
  visibility: hidden;
}

.location-swipe-card.swiping {
  transition: none;
}

.location-swipe-card.fly-left {
  opacity: 0;
  transform: translate(-120%, 20px) rotate(-22deg) !important;
}

.location-swipe-card.fly-right {
  opacity: 0;
  transform: translate(120%, 20px) rotate(22deg) !important;
}

.swipe-card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.swipe-card-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(15, 15, 13, 0.17), transparent 28%),
    linear-gradient(to top, rgba(9, 9, 8, 0.91), transparent 58%);
}

.card-top {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-pill,
.photo-count {
  height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.64);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.preview-pill svg,
.photo-count svg {
  width: 12px;
}

.card-copy {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  left: 24px;
  color: #fff;
}

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

.card-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.card-copy h2 {
  margin: 14px 0 8px;
  font-size: clamp(28px, 3.2vw, 39px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.card-area {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
}

.card-area svg {
  width: 13px;
}

.card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 19px;
}

.card-note {
  max-width: 300px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 10px;
  line-height: 1.45;
}

.card-price {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.card-price small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 8px;
}

.card-price b {
  margin-top: 2px;
  color: var(--acid);
  font-size: 22px;
  letter-spacing: -0.04em;
}

.swipe-stamp {
  position: absolute;
  z-index: 4;
  top: 85px;
  padding: 8px 13px;
  border: 3px solid currentColor;
  border-radius: 9px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
}

.swipe-stamp.like-stamp {
  left: 28px;
  color: var(--acid);
  transform: rotate(-12deg);
}

.swipe-stamp.pass-stamp {
  right: 28px;
  color: #ff7385;
  transform: rotate(12deg);
}

.empty-deck {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 27px;
  background: var(--panel);
  text-align: center;
}

.empty-icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--acid);
  transform: rotate(-5deg);
}

.empty-icon svg {
  width: 27px;
}

.empty-deck h2 {
  margin: 20px 0 8px;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.empty-deck p {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.empty-deck button {
  margin-top: 18px;
  padding: 11px 15px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-top: 24px;
}

.swipe-button {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 8px 25px rgba(25, 26, 22, 0.09);
  cursor: pointer;
  transition: 0.2s ease;
}

.swipe-button:hover {
  transform: translateY(-3px);
}

.swipe-button svg {
  width: 23px;
}

.swipe-button.reject {
  width: 66px;
  height: 66px;
  color: var(--rose);
}

.swipe-button.like {
  width: 66px;
  height: 66px;
  border-color: var(--acid);
  background: var(--acid);
}

.swipe-button.like svg {
  fill: currentColor;
}

.swipe-button.undo,
.swipe-button.info {
  width: 48px;
  height: 48px;
  color: #7e8078;
}

.swipe-button.undo svg,
.swipe-button.info svg {
  width: 18px;
}

.swipe-button:disabled {
  opacity: 0.32;
  pointer-events: none;
}

.swipe-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 14px 0 0;
  color: #a0a19a;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.swipe-hint span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.swipe-hint span:nth-child(2) {
  color: #c1c0ba;
  letter-spacing: 0.12em;
}

.swipe-hint svg {
  width: 12px;
}

.discovery-aside {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.progress-card,
.privacy-card,
.mini-stats {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(250, 249, 246, 0.85);
}

.progress-card {
  padding: 17px;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 750;
}

.progress-top b {
  color: #8b8c84;
  font-size: 9px;
}

.progress-line {
  height: 6px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e3dc;
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 0.35s ease;
}

.progress-card p,
.privacy-card p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.privacy-card {
  display: flex;
  gap: 12px;
  padding: 17px;
}

.privacy-icon {
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--acid);
}

.privacy-icon svg {
  width: 17px;
}

.privacy-card b {
  display: block;
  margin: 2px 0 6px;
  font-size: 10px;
}

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 16px;
}

.mini-stats div {
  display: flex;
  flex-direction: column;
}

.mini-stats div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.mini-stats strong {
  font-size: 22px;
  letter-spacing: -0.04em;
}

.mini-stats span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.library-view,
.profile-view {
  padding-bottom: 70px;
}

.library-grid,
.owned-grid {
  width: min(1100px, calc(100% - 70px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 8px auto 0;
}

.library-card,
.owned-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  cursor: pointer;
  transition: 0.25s ease;
}

.library-card:hover,
.owned-card:hover {
  border-color: #c9c6bd;
  box-shadow: 0 16px 40px rgba(26, 27, 23, 0.09);
  transform: translateY(-3px);
}

.library-image,
.owned-image {
  position: relative;
  aspect-ratio: 1.35;
  overflow: hidden;
}

.library-image img,
.owned-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.library-image::after,
.owned-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 55%, rgba(12, 12, 10, 0.42));
}

.library-price,
.owned-status {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.library-price {
  background: var(--acid);
}

.owned-status {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  color: #3d4b12;
}

.owned-status svg {
  width: 11px;
}

.library-body,
.owned-body {
  padding: 16px;
}

.library-type,
.owned-type {
  color: #8b8c84;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.library-body h2,
.owned-body h2 {
  margin: 8px 0 6px;
  overflow: hidden;
  font-size: 17px;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-body p,
.owned-body p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.library-actions {
  display: grid;
  grid-template-columns: 1fr 39px;
  gap: 7px;
  margin-top: 14px;
}

.library-actions button {
  height: 39px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.library-actions .open-button {
  background: var(--ink);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
}

.library-actions .remove-button {
  display: grid;
  place-items: center;
  background: #ebe9e2;
}

.remove-button svg {
  width: 15px;
}

.empty-library {
  grid-column: 1 / -1;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c9c6bd;
  border-radius: 22px;
  text-align: center;
}

.empty-library svg {
  width: 29px;
  color: #a5a69f;
}

.empty-library h2 {
  margin: 16px 0 7px;
  font-size: 21px;
  letter-spacing: -0.04em;
}

.empty-library p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.empty-library button {
  margin-top: 16px;
  padding: 11px 15px;
  border: 0;
  border-radius: 11px;
  background: var(--acid);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.profile-hero {
  width: min(1100px, calc(100% - 70px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 50px 0 32px;
  border-bottom: 1px solid var(--line);
}

.profile-person {
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 26px;
  background: #d8cfff;
  font-size: 22px;
  font-weight: 850;
  transform: rotate(-3deg);
}

.profile-person h1 {
  font-size: 37px;
}

.outline-button {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.outline-button svg {
  width: 15px;
}

.profile-tabs {
  width: min(1100px, calc(100% - 70px));
  display: flex;
  gap: 24px;
  margin: 0 auto 22px;
  border-bottom: 1px solid var(--line);
}

.profile-tabs button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 18px 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.profile-tabs button.active {
  color: var(--ink);
}

.profile-tabs button.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
}

.profile-tabs span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e5e3dc;
  font-size: 8px;
}

.owned-card {
  cursor: pointer;
}

.owned-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.owned-body > div {
  min-width: 0;
}

.owned-open-icon {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--acid);
}

.owned-open-icon svg {
  width: 14px;
}

.backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  background: rgba(20, 21, 18, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  backdrop-filter: blur(5px);
}

.backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.detail-sheet {
  position: fixed;
  z-index: 600;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(570px, 100vw);
  overflow-y: auto;
  background: var(--panel);
  box-shadow: -18px 0 70px rgba(20, 21, 18, 0.2);
  transform: translateX(105%);
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.28, 1);
}

.detail-sheet.open {
  transform: translateX(0);
}

.sheet-close,
.modal-close {
  position: absolute;
  z-index: 10;
  top: 16px;
  right: 16px;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 20px rgba(20, 21, 18, 0.12);
  cursor: pointer;
}

.sheet-close svg,
.modal-close svg {
  width: 17px;
}

.detail-cover {
  position: relative;
  height: 400px;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(transparent, rgba(12, 12, 10, 0.58));
}

.detail-cover-label {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(20, 20, 17, 0.68);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
}

.detail-cover-label svg {
  width: 12px;
}

.detail-body {
  padding: 27px 31px 42px;
}

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

.detail-tags span {
  padding: 7px 9px;
  border-radius: 999px;
  background: #eceae3;
  color: #62635d;
  font-size: 9px;
  font-weight: 750;
}

.detail-body h2 {
  margin: 16px 0 9px;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-area {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.detail-area svg {
  width: 13px;
}

.detail-description {
  margin: 18px 0 0;
  color: #63645e;
  font-size: 11px;
  line-height: 1.65;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 21px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.author-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d8cfff;
  font-size: 10px;
  font-weight: 800;
}

.author-row > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.author-row b {
  font-size: 10px;
}

.author-row span:not(.author-avatar) {
  color: var(--muted);
  font-size: 8px;
}

.author-rating {
  margin-left: auto;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 4px !important;
  color: var(--ink) !important;
  font-size: 10px !important;
  font-weight: 750;
}

.author-rating svg {
  width: 12px;
  fill: currentColor;
}

.locked-preview {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #efede7;
}

.locked-preview > span {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--acid);
}

.locked-preview svg {
  width: 17px;
}

.locked-preview div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.locked-preview b {
  font-size: 10px;
}

.locked-preview small {
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

.purchase-box {
  margin-top: 18px;
  padding: 19px;
  border-radius: 17px;
  background: var(--ink);
  color: #fff;
}

.purchase-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.purchase-head div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.purchase-head b {
  font-size: 11px;
}

.purchase-head small {
  color: #91928c;
  font-size: 8px;
}

.purchase-price {
  color: var(--acid);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.purchase-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 17px 0;
}

.purchase-list span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #d0d1cc;
  font-size: 8.5px;
}

.purchase-list svg {
  width: 12px;
  color: var(--acid);
}

.primary-button {
  width: 100%;
  height: 47px;
  border: 0;
  border-radius: 13px;
  background: var(--acid);
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-button:hover {
  background: var(--acid-strong);
  transform: translateY(-1px);
}

.unlocked-block {
  margin-top: 20px;
}

.unlocked-head {
  padding: 17px;
  border: 1px solid #c9df4b;
  border-radius: 16px;
  background: #f2fac8;
}

.unlocked-head span {
  color: #6b762c;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.unlocked-head h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 4px;
  font-size: 14px;
}

.unlocked-head h3 svg {
  width: 15px;
}

.unlocked-head p {
  margin: 0;
  color: #676d46;
  font-size: 8.5px;
  line-height: 1.45;
}

.exact-map {
  height: 230px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #e7e4dc;
}

.exact-map .leaflet-control-attribution {
  font-size: 7px;
}

.route-notes {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.route-notes b {
  display: block;
  font-size: 10px;
}

.route-notes p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.modal {
  position: fixed;
  z-index: 650;
  top: 50%;
  left: 50%;
  width: min(430px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 32px;
  border-radius: 23px;
  background: var(--panel);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -46%) scale(0.96);
  transition: 0.25s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.payment-modal h2,
.add-modal h2 {
  margin: 13px 0 9px;
  font-size: 28px;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.payment-modal p,
.add-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.payment-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 20px 0 15px;
  padding: 11px;
  border-radius: 14px;
  background: #eceae3;
}

.payment-summary img {
  width: 68px;
  height: 55px;
  border-radius: 9px;
  object-fit: cover;
}

.payment-summary div {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.payment-summary b {
  overflow: hidden;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-summary span {
  color: var(--muted);
  font-size: 8px;
}

.payment-summary strong {
  font-size: 12px;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 13px;
  border: 1px solid var(--ink);
  border-radius: 13px;
}

.payment-method svg {
  width: 18px;
}

.payment-method div {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.payment-method b {
  font-size: 9.5px;
}

.payment-method span {
  color: var(--muted);
  font-size: 8px;
}

.payment-radio {
  width: 17px;
  height: 17px;
  border: 5px solid var(--ink);
  border-radius: 50%;
}

.demo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 10px;
  color: #969790;
  font-size: 7.5px;
}

.demo-note svg {
  width: 10px;
}

.payment-success {
  padding: 12px 0 2px;
  text-align: center;
}

.success-icon,
.modal-icon {
  width: 57px;
  height: 57px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  border-radius: 19px;
  background: var(--acid);
  transform: rotate(-5deg);
}

.success-icon svg,
.modal-icon svg {
  width: 25px;
}

.payment-success h2 {
  margin: 0;
}

.payment-success p {
  margin: 9px 0 19px;
}

.add-modal {
  width: min(650px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  padding: 38px;
}

.add-intro .modal-icon {
  margin: 0 0 23px;
}

.add-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.add-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #5e5f59;
  font-size: 8.5px;
  font-weight: 750;
}

.add-form input,
.add-form select,
.add-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 10px;
}

.add-form input,
.add-form select {
  height: 39px;
  padding: 0 11px;
}

.add-form textarea {
  min-height: 72px;
  padding: 10px 11px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.upload-zone {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px dashed #bab8b0;
  border-radius: 12px;
  background: #eeece5;
  cursor: pointer;
}

.upload-zone svg {
  width: 18px;
}

.upload-zone span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.upload-zone b {
  font-size: 9px;
}

.upload-zone small {
  color: var(--muted);
  font-size: 7.5px;
}

.toast {
  position: fixed;
  z-index: 800;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 9.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast svg {
  width: 15px;
  color: var(--acid);
}

@media (max-width: 1050px) {
  .app {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .sidebar {
    width: 205px;
  }

  .discover-layout {
    grid-template-columns: minmax(400px, 540px) minmax(210px, 250px);
    gap: 35px;
  }

  .library-grid,
  .owned-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  body {
    background: var(--panel);
  }

  .auth-gate {
    display: block;
    overflow-y: auto;
  }

  .auth-visual {
    min-height: 245px;
    padding: 21px 18px;
  }

  .auth-promise {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    margin-top: 45px;
    transform: none;
  }

  .auth-promise h1 {
    margin-top: 11px;
    font-size: 37px;
  }

  .auth-promise p,
  .auth-preview-card {
    display: none;
  }

  .auth-panel {
    display: block;
    padding: 28px 20px 45px;
  }

  .auth-box {
    margin: 0 auto;
  }

  .app {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .workspace {
    padding-bottom: 69px;
  }

  .mobile-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: 63px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border-bottom: 1px solid var(--line);
    background: rgba(250, 249, 246, 0.94);
    backdrop-filter: blur(15px);
  }

  .mobile-header .brand {
    padding: 0;
    font-size: 19px;
  }

  .mobile-header .brand-symbol {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .mobile-header .brand-symbol svg {
    width: 15px;
  }

  .city-pill {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 0 11px;
    border: 0;
    border-radius: 11px;
    background: #ebe9e2;
    font-size: 9px;
    font-weight: 750;
  }

  .city-pill svg {
    width: 13px;
  }

  .mobile-avatar {
    border: 0;
  }

  .view {
    min-height: calc(100vh - 132px);
  }

  .view-header {
    width: auto;
    padding: 23px 17px 15px;
  }

  .discover-header {
    display: block;
  }

  .discover-header h1 {
    font-size: 35px;
  }

  .header-tools {
    display: none;
  }

  .discover-layout {
    width: auto;
    display: block;
    padding: 0 14px 25px;
  }

  .deck {
    width: 100%;
    height: min(62vh, 570px);
    min-height: 465px;
  }

  .location-swipe-card {
    border-radius: 23px;
  }

  .card-copy {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .card-copy h2 {
    font-size: 31px;
  }

  .swipe-actions {
    margin-top: 18px;
  }

  .swipe-button {
    width: 53px;
    height: 53px;
  }

  .swipe-button.reject,
  .swipe-button.like {
    width: 62px;
    height: 62px;
  }

  .swipe-hint,
  .discovery-aside {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    z-index: 300;
    right: 0;
    bottom: 0;
    left: 0;
    height: 69px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: rgba(250, 249, 246, 0.96);
    backdrop-filter: blur(15px);
  }

  .mobile-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: #92938c;
    font-size: 7.5px;
    font-weight: 700;
  }

  .mobile-nav button.active {
    color: var(--ink);
  }

  .mobile-nav svg {
    width: 18px;
  }

  .library-view,
  .profile-view {
    padding-bottom: 30px;
  }

  .library-grid,
  .owned-grid {
    width: auto;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    margin: 0;
    padding: 0 15px;
  }

  .library-image,
  .owned-image {
    aspect-ratio: 1.08;
  }

  .library-body,
  .owned-body {
    padding: 12px;
  }

  .library-body h2,
  .owned-body h2 {
    font-size: 13px;
  }

  .library-actions {
    grid-template-columns: 1fr 35px;
  }

  .profile-hero {
    width: auto;
    align-items: flex-start;
    margin: 0 16px;
    padding: 28px 0 22px;
  }

  .profile-person {
    align-items: flex-start;
    gap: 13px;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 16px;
  }

  .profile-person h1 {
    margin-top: 8px;
    font-size: 27px;
  }

  .profile-person p {
    display: none;
  }

  .outline-button {
    width: 39px;
    padding: 0;
    justify-content: center;
  }

  .outline-button span {
    display: none;
  }

  .profile-tabs {
    width: auto;
    margin: 0 16px 17px;
  }

  .detail-sheet {
    top: 30px;
    border-radius: 22px 22px 0 0;
  }

  .detail-cover {
    height: 310px;
  }

  .detail-body {
    padding: 23px 20px 35px;
  }

  .detail-body h2 {
    font-size: 30px;
  }

  .modal {
    padding: 29px 22px;
  }

  .add-modal {
    display: block;
  }

  .add-intro {
    margin-bottom: 23px;
  }

  .add-intro .modal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
  }
}

@media (max-width: 390px) {
  .discover-header h1 {
    font-size: 31px;
  }

  .deck {
    min-height: 430px;
  }

  .card-note {
    display: none;
  }

  .library-grid,
  .owned-grid {
    grid-template-columns: 1fr;
  }
}
