:root {
  --canvas: #f7f7f6;
  --paper: #fff;
  --ink: #12120e;
  --muted: #6f6f6a;
  --quiet: #9a9a93;
  --pink: #fb1e64;
  --pink-dark: #d91453;
  --yellow: #ffde2e;
  --line: rgba(18, 18, 14, 0.1);
  --strong-line: rgba(18, 18, 14, 0.16);
  color-scheme: light;
  font-family: Archivo, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 300px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(247, 247, 246, 0.5), rgba(247, 247, 246, 0.5)),
    url("/assets/background.jpg");
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(251, 30, 100, 0.3);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.home-view,
.loading-view,
.results-view {
  width: 100%;
  margin: 0 auto;
}

.home-view {
  max-width: 540px;
}

.home-content {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 0 20px calc(36px + env(safe-area-inset-bottom));
}

.wordmark {
  align-self: flex-start;
  padding-top: 28px;
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: auto;
  height: 40px;
}

h1,
h2,
h3,
p {
  margin-block: 0;
}

.home-content h1 {
  max-width: 10.5em;
  margin-top: 48px;
  font-size: clamp(38px, 10vw, 56px);
  font-weight: 700;
  letter-spacing: -0.042em;
  line-height: 0.97;
  text-wrap: pretty;
}

.home-content h1 span {
  padding-bottom: 0.04em;
  color: var(--pink);
  background: linear-gradient(var(--yellow), var(--yellow)) 0 92% / 100% 0.16em no-repeat;
}

.intro {
  margin-top: 20px;
  color: var(--muted);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

#searchForm {
  margin-top: 30px;
}

.search-card {
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(18, 18, 14, 0.04);
}

.location-field {
  position: relative;
  z-index: 2;
  padding: 15px 18px 17px;
}

.eyebrow {
  display: block;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}

#locationInput {
  display: block;
  width: 100%;
  height: 26px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 26px;
}

#locationInput::placeholder {
  color: #aaa9a4;
}

.location-input-frame {
  position: relative;
  height: 26px;
  margin-top: 6px;
}

.location-rotator {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.location-rotator-city {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--ink);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 26px;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
}

.location-rotator-city.is-entering {
  opacity: 0;
  transform: translateY(-110%);
}

.location-rotator-city.is-exiting {
  opacity: 0;
  transform: translateY(110%);
}

.quick-locations {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip {
  padding: 8px 13px;
  border: 1px solid rgba(18, 18, 14, 0.13);
  border-radius: 999px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.chip:hover,
.stepper button:hover,
.icon-button:hover,
.edit-button:hover {
  border-color: var(--pink);
  color: var(--pink);
}

.suggestions {
  position: absolute;
  top: 74px;
  right: 12px;
  left: 12px;
  z-index: 20;
  overflow: hidden;
  border: 1px solid var(--strong-line);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(18, 18, 14, 0.14);
}

.suggestion,
.suggestion-status {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  text-align: left;
}

.suggestion:last-child {
  border-bottom: 0;
}

.suggestion {
  display: block;
  padding: 11px 13px;
}

.suggestion strong,
.suggestion small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.018em;
}

.suggestion small,
.suggestion-status {
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10.5px;
}

.suggestion small {
  margin-top: 3px;
}

.suggestion:hover,
.suggestion.is-active {
  background: #fff8fa;
}

.suggestion-status {
  padding: 14px 13px;
  line-height: 1.5;
}

.search-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.search-detail {
  min-width: 0;
  padding: 14px 18px 16px;
}

.search-detail:first-child {
  border-right: 1px solid var(--line);
}

.detail-summary {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  text-align: left;
}

.detail-summary > span,
.detail-copy > span {
  display: block;
  overflow: hidden;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-summary small,
.detail-copy small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-summary:hover > span {
  color: var(--pink);
}

.detail-copy {
  margin-top: 6px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.stepper button,
.icon-button {
  display: inline-flex;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(18, 18, 14, 0.13);
  border-radius: 10px;
  background: var(--paper);
  font-size: 17px;
  line-height: 1;
}

.stepper > span {
  min-width: 62px;
  color: var(--muted);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 12.5px;
}

.room-stepper {
  gap: 10px;
}

.form-error {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(183, 18, 66, 0.22);
  border-radius: 10px;
  background: #fff1f5;
  color: #9c123d;
  font-size: 13px;
  line-height: 1.4;
}

.search-action-bar {
  display: flex;
  justify-content: center;
  margin-top: 42px;
}

.search-action-content {
  width: 100%;
  max-width: 500px;
}

.primary-button {
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 0;
  border-radius: 15px;
  background: var(--pink);
  box-shadow: 0 6px 18px rgba(251, 30, 100, 0.28);
  color: var(--paper);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.search-action-content .primary-button {
  height: 60px;
  font-size: 18px;
}

.primary-button:hover {
  background: #e01656;
}

.primary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.search-action-content p {
  margin-top: 11px;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: -0.005em;
  text-align: center;
}

.site-footer {
  margin-top: auto;
  padding-top: 48px;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.footer-credit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.footer-credit a {
  display: inline-flex;
  align-items: center;
}

.footer-credit img {
  display: block;
  width: auto;
  height: 25px;
}

.loading-view {
  display: flex;
  max-width: 540px;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.loading-view h2 {
  font-size: clamp(27px, 6.8vw, 36px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.loading-track {
  overflow: hidden;
  width: 100%;
  max-width: 240px;
  height: 4px;
  border-radius: 999px;
  background: rgba(18, 18, 14, 0.08);
}

.loading-track span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: var(--pink);
  animation: loading-bar 900ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loading-view p,
.results-bar span,
.results-note,
.sheet-summary,
.sheet-footnote {
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
}

.loading-view p {
  font-size: 12px;
}

.results-view {
  display: flex;
  max-width: 620px;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  padding: 0 16px 40px;
}

.results-view > .wordmark {
  margin-bottom: 20px;
}

.results-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 -16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(18, 18, 14, 0.08);
  background: rgba(247, 247, 246, 0.94);
  backdrop-filter: blur(10px);
}

.results-bar .icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.results-bar > div {
  min-width: 0;
  flex: 1;
}

.results-bar strong,
.results-bar span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.results-bar strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.028em;
}

.results-bar span {
  margin-top: 2px;
  font-size: 11px;
}

.edit-button {
  flex: 0 0 auto;
  height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(18, 18, 14, 0.13);
  border-radius: 12px;
  background: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.results-view > h2 {
  padding: 26px 2px 16px;
  font-size: clamp(25px, 6.2vw, 33px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
}

.rating-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  text-align: left;
}

.rating-toggle:hover {
  border-color: rgba(18, 18, 14, 0.28);
}

.rating-toggle > span:nth-child(2) {
  flex: 1;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.rating-toggle small {
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex: 0 0 auto !important;
  border: 1px solid rgba(18, 18, 14, 0.14);
  border-radius: 999px;
  background: var(--yellow);
  transition: background 140ms ease;
}

.switch span {
  position: absolute;
  top: 2px;
  left: 21px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
  transition: left 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.rating-toggle[aria-checked="false"] .switch {
  background: #eeede8;
}

.rating-toggle[aria-checked="false"] .switch span {
  left: 2px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.result-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: stretch;
  gap: 14px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(18, 18, 14, 0.04);
  animation: card-in 260ms ease both;
}

.hotel-image {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  border-radius: 11px;
  background-color: var(--hotel-tint, #edeae4);
  background-image: url("/assets/hotel-placeholder.svg");
  background-position: center;
  background-size: cover;
}

.rank {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: var(--pink);
  color: var(--paper);
  font-size: 12px;
  font-weight: 700;
}

.photo-label {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 5px 6px;
  color: rgba(18, 18, 14, 0.45);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hotel-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.hotel-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hotel-heading > div {
  min-width: 0;
  flex: 1;
}

.hotel-heading h3 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hotel-meta,
.review-count,
.price-sub {
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
}

.hotel-meta {
  margin-top: 3px;
  font-size: 11px;
}

.cheapest-badge {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--yellow);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.rating-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(18, 18, 14, 0.13);
  border-radius: 8px;
}

.rating-pill strong {
  font-size: 13px;
  letter-spacing: -0.02em;
}

.rating-pill span,
.review-count {
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10px;
}

.rating-pill span {
  color: var(--muted);
}

.review-count {
  font-size: 11px;
}

.price-row {
  display: flex;
  flex: 1;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.price {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}

.result-card:first-child .price {
  color: var(--pink);
}

.price-sub {
  margin-top: 4px;
  font-size: 10.5px;
}

.book-button {
  height: 42px;
  flex: 0 0 auto;
  padding: 0 21px;
  border: 0;
  border-radius: 12px;
  background: var(--pink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.book-button:hover {
  background: #e01656;
}

.results-note {
  margin-top: 22px;
  padding: 0 4px;
  font-size: 11.5px;
  line-height: 1.6;
}

.empty-state {
  padding: 34px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
}

.empty-state h3 {
  font-size: 18px;
  letter-spacing: -0.025em;
}

.empty-state p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.sheet-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sheet-dialog[open] {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-dialog::backdrop {
  background: rgba(18, 18, 14, 0.34);
}

.sheet-panel {
  width: 100%;
  max-width: 520px;
  padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  background: var(--paper);
  animation: sheet-in 200ms ease both;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(18, 18, 14, 0.14);
}

.sheet-panel h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.sheet-summary {
  margin-top: 6px;
  font-size: 11.5px;
}

.price-breakdown {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.price-breakdown strong {
  color: var(--ink);
  font-weight: 500;
}

.price-breakdown .total-line {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.price-breakdown .total-line strong {
  font-weight: 700;
}

.sheet-footnote {
  margin-top: 11px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.booking-placeholder {
  padding: 6px 0 4px;
}

.success-mark {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 21px;
  font-weight: 700;
}

.booking-placeholder h2 {
  margin-top: 16px;
}

.booking-placeholder p {
  margin-top: 8px;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.6;
}

.secondary-button {
  width: 100%;
  height: 52px;
  margin-top: 20px;
  border: 1px solid var(--strong-line);
  border-radius: 15px;
  background: var(--paper);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.secondary-button:hover {
  border-color: var(--ink);
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.sheet-header > div {
  flex: 1;
}

.sheet-header p {
  margin-top: 6px;
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 11px;
}

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 20px 0 16px;
}

.date-inputs label {
  color: var(--quiet);
  font-family: "DM Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-inputs input {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: 7px;
  padding: 0 10px;
  border: 1px solid var(--strong-line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, Helvetica, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
}

.dates-dialog .form-error {
  margin: -6px 0 14px;
}

.visually-hidden {
  position: absolute !important;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes loading-bar {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 380px) {
  .home-content {
    padding-right: 14px;
    padding-left: 14px;
  }

  .search-detail {
    padding-right: 10px;
    padding-left: 10px;
  }

  .detail-summary > span,
  .detail-copy > span {
    font-size: 13px;
  }

  .stepper {
    gap: 6px;
  }

  .stepper button {
    width: 32px;
    height: 32px;
  }

  .stepper > span {
    min-width: 44px;
    font-size: 11px;
    white-space: nowrap;
  }

  .result-card {
    grid-template-columns: 84px 1fr;
    gap: 11px;
  }

  .hotel-image {
    min-height: 108px;
  }

  .cheapest-badge {
    display: none;
  }
}

@media (max-width: 340px) {
  .result-card {
    grid-template-columns: 76px 1fr;
  }

  .price-row {
    gap: 8px;
  }

  .book-button {
    padding: 0 15px;
  }

  .date-inputs {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 760px) {
  .home-content {
    padding-top: 14px;
  }

  .results-view {
    padding-bottom: 64px;
  }

  .result-card {
    grid-template-columns: 112px 1fr;
  }

  .hotel-image {
    min-height: 116px;
  }

  .sheet-dialog[open] {
    align-items: center;
  }

  .sheet-panel {
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(18, 18, 14, 0.25);
  }
}

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