*:where(:not(dialog, canvas, iframe, img, svg, video):not(svg *)) {
  all: unset;
  display: revert;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
  font-weight: 400;
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top right, #ff8fb1 0%, transparent 45%),
    radial-gradient(circle at 20% 20%, #6d8bff 0%, transparent 40%),
    #05060a;
  background-attachment: fixed;
  color: #f7f7fb;
  padding: clamp(1.4rem, 3vw, 2.5rem);
}


.modal-open {
  overflow: hidden;
}

.show-login {
  display: flex;
  align-items: center;
  justify-content: center;
}

:focus-visible {
  outline: 2px solid #ffb347;
  outline-offset: 3px;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.is-hidden {
  display: none !important;
}

.fab {
  position: fixed;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  right: clamp(1.5rem, 4vw, 2.5rem);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #6d8bff, #ff8fb1);
  color: #05060a;
  font-size: 2.4rem;
  font-weight: 600;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 20;
  transition: transform 0.15s ease;
}

.fab:hover {
  transform: translateY(-2px);
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  z-index: 30;
}

.modal.is-hidden {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.75);
  backdrop-filter: blur(4px);
}

.modal__dialog {
  position: relative;
  max-width: 760px;
  width: min(760px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal__close {
  border: none;
  background: transparent;
  color: rgba(247, 247, 251, 0.8);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 720px) {
  .modal__dialog {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 30px 30px 0 0;
    margin-top: auto;
    padding-bottom: 4rem;
  }
}

.login {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  text-align: left;
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.login-brand h1 {
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: #fff;
}

.login-brand span {
  color: #ff4f7d;
}

.show-login .login {
  margin: 0;
  width: min(640px, 92vw);
}

.login-form {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.login-hint {
  color: rgba(247, 247, 251, 0.7);
  font-size: 0.9rem;
}

.login-error {
  color: #ff9b9b;
  font-size: 0.9rem;
}

.card {
  background: rgba(7, 9, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: clamp(1.5rem, 2vw, 2.2rem);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.eyebrow {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: rgba(244, 244, 255, 0.6);
  margin-bottom: 0.4rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
}

.lead {
  color: rgba(247, 247, 251, 0.84);
  max-width: 65ch;
}

.app__header {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.app__hero {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  flex-wrap: wrap;
  align-items: flex-start;
  flex: 1 1 55%;
  min-width: 280px;
}

.app__hero-title {
  min-width: 220px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 1.2rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.app__hero-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-heart {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #ff88b3;
}

.hero-sub {
  margin: 0.4rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.7);
}

.account-switch {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-self: flex-start;
  flex: 0 0 auto;
}

.account-greeting {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 1rem;
}

.account-greeting strong {
  font-size: 1.1rem;
}

.badge {
  border-radius: 999px;
  padding: 0.3rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.account-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.account-logout .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.account-logout svg {
  width: 100%;
  height: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stats__label {
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.65);
}

.stats strong {
  font-size: 2rem;
}

.suggestion {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: space-between;
  align-items: flex-end;
}

.suggestion__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.85rem 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn--primary {
  background: linear-gradient(120deg, #6d8bff, #ff8fb1);
  color: #05060a;
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
}

.form-card h2,
.list-card h2 {
  margin-bottom: 1rem;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-weight: 500;
}

input,
select,
textarea {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.9rem 1rem;
  background: rgba(4, 5, 10, 0.8);
  color: inherit;
  font: inherit;
}

textarea {
  resize: vertical;
}

.file-upload .file-upload__drop {
  position: relative;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload__info strong {
  display: block;
  color: #fff;
  font-size: 0.85rem;
}

.file-upload__info span {
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.7);
}

.inline-label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.inline-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #ff8fb1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.form-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.form-tabs button {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.form-tabs button.is-active {
  background: rgba(255, 255, 255, 0.2);
}

.form-step.is-hidden {
  display: none;
}

.osm-search {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.75rem;
}

.osm-search__row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.osm-search__row input {
  flex: 1;
  min-width: 220px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.15);
  padding: 0.75rem 1rem;
  color: inherit;
  font: inherit;
}

.osm-search__hint {
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.7);
}

.osm-search__status {
  min-height: 1rem;
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.9);
}

.osm-results {
  display: grid;
  gap: 0.6rem;
}

.osm-result {
  display: grid;
  gap: 0.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.osm-result:hover,
.osm-result.is-selected {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}

.osm-result__name {
  font-weight: 600;
}

.osm-result__meta {
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.8);
}

.osm-result__thumb {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

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

.osm-photo-preview {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
}

.osm-photo-preview img {
  width: 100%;
  border-radius: 14px;
  max-height: 220px;
  object-fit: cover;
  display: block;
}

.osm-photo-preview p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.75);
}

.upload-preview {
  margin-top: 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.upload-preview img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.upload-preview p {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.75);
}

.rating-list {
  display: grid;
  gap: 1rem;
}

.rating-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(8, 11, 20, 0.75);
}

.rating-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.rating-card__meta {
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.7);
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.rating-link {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(247, 247, 251, 0.85);
  font-size: 0.85rem;
  text-align: left;
  padding: 0.3rem 0.6rem;
  cursor: pointer;
  border-radius: 14px;
}

.rating-link:hover {
  color: #fff;
}



.list-card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.list-count {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(247, 247, 251, 0.7);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filters button {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 0.9rem;
}

.filters button.is-active {
  background: rgba(255, 255, 255, 0.15);
}

.filter-search {
  position: relative;
}

.filter-search input {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.45rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.restaurant-list {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.restaurant-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(8, 11, 20, 0.85);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

.restaurant-card__media {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  pointer-events: none;
}

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

.restaurant-card__body {
  padding: 1rem 1.2rem 0.9rem;
  display: grid;
  gap: 0.5rem;
  flex: 1;
}

.restaurant-card__top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
}

.restaurant-card__top h3 {
  margin: 0;
}

.restaurant-card__meta {
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.75);
  margin: 0;
}

.restaurant-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
}

.chip {
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid transparent;
}

.chip--visited {
  background: rgba(115, 219, 145, 0.2);
  border-color: rgba(115, 219, 145, 0.3);
  color: #8ff4b1;
}

.chip--wishlist {
  background: rgba(255, 198, 120, 0.2);
  border-color: rgba(255, 198, 120, 0.3);
  color: #ffdba8;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: rgba(247, 247, 251, 0.8);
}

.card-notes {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  color: rgba(247, 247, 251, 0.9);
  font-size: 0.85rem;
}

.card-meta--mini {
  font-size: 0.8rem;
  gap: 0.6rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.card-actions button {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

details {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.8rem 1rem;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

.entry-form {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.icon-btn {
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  font-size: 1.1rem;
}

.icon-btn.is-active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffb347;
}

.empty-state {
  text-align: center;
  color: rgba(247, 247, 251, 0.7);
  padding: 1rem;
}

.app-footer {
  text-align: center;
  margin: 3rem auto 1rem;
  color: rgba(247, 247, 251, 0.65);
  font-size: 1rem;
}

.app-footer span {
  color: #ff88b3;
  font-weight: 600;
}

.recent {
  display: grid;
  gap: 1.5rem;
}


.recent-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.recent-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 12, 18, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.recent-card__media {
  position: relative;
  height: 140px;
  overflow: hidden;
}

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

.recent-card__body {
  padding: 1rem 1.2rem 1.2rem;
  display: grid;
  gap: 0.5rem;
  flex: 1;
}

.recent-card h3 {
  margin: 0;
}

.recent-card__meta {
  font-size: 0.9rem;
  color: rgba(247, 247, 251, 0.7);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.recent-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.5rem;
}

.restaurant-card__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.recent-heart,
.card-edit,
.card-toggle,
.card-refresh {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.recent-heart.is-active {
  color: #ff88b3;
}

.recent-heart:hover {
  transform: scale(1.1);
}

.card-edit,
.card-toggle,
.card-refresh {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
}

.card-edit:hover,
.card-toggle:hover,
.card-refresh:hover {
  color: #fff;
}

@media (max-width: 720px) {
  .recent-heart,
  .card-edit,
  .card-toggle,
  .card-refresh {
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
  }
}

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

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

  body {
    padding: 1rem;
  }
}
