:root {
  color-scheme: light;
  --ink: #263142;
  --muted: #667085;
  --paper: #fbfbf8;
  --panel: #ffffff;
  --line: #b8c9ec;
  --blue: #73a5d8;
  --green: #87b88f;
  --coral: #e29a7a;
  --shadow: 0 24px 80px rgba(47, 61, 84, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(115, 165, 216, 0.15), transparent 34%),
    linear-gradient(225deg, rgba(226, 154, 122, 0.15), transparent 32%),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 48px;
}

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

.home-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.home-header {
  max-width: 680px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: #4a7da8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.home-header h1,
.room-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.home-header h1 {
  font-size: clamp(2.55rem, 6vw, 5.4rem);
  line-height: 0.96;
}

.home-copy {
  margin: 18px auto 0;
  max-width: 520px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.carousel {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 18px;
}

.carousel-stage {
  position: relative;
  height: clamp(340px, 52vw, 500px);
  overflow: hidden;
}

.room-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(460px, 72vw);
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0.54;
  transition:
    transform 320ms ease,
    opacity 320ms ease,
    box-shadow 320ms ease;
}

.room-card.is-active {
  z-index: 3;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.room-card.is-prev {
  z-index: 2;
  transform: translate(-116%, -50%) scale(0.78);
}

.room-card.is-next {
  z-index: 2;
  transform: translate(16%, -50%) scale(0.78);
}

.room-card:hover,
.room-card:focus-visible {
  box-shadow: 0 28px 86px rgba(47, 61, 84, 0.24);
  outline: none;
}

.room-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.room-card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 18px 22px;
}

.room-card-label strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: 0;
}

.room-card-label span {
  min-width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef5fb;
  color: #356b9d;
  font-weight: 800;
}

.arrow-button {
  width: 58px;
  height: 58px;
  border: 2px solid #c8d6ee;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #42617d;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.arrow-button:hover,
.arrow-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: #ffffff;
  outline: none;
}

.dots {
  display: flex;
  gap: 10px;
}

.dot-button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #cfd6df;
  cursor: pointer;
}

.dot-button.is-active {
  width: 34px;
  border-radius: 999px;
  background: var(--blue);
}

.detail-view {
  padding: 14px 0 36px;
}

.room-header {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.back-button {
  justify-self: start;
  padding: 0 22px;
  min-height: 44px;
  border: 2px solid #ced8e8;
  border-radius: 999px;
  background: #ffffff;
  color: #40566f;
  cursor: pointer;
  font-weight: 800;
}

.back-button:hover,
.back-button:focus-visible {
  border-color: var(--blue);
  outline: none;
}

.room-title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.room-badge {
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe0a1;
  border: 3px solid rgba(38, 49, 66, 0.18);
}

.room-badge svg {
  width: 54px;
  height: 54px;
}

.room-header h1 {
  overflow-wrap: anywhere;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
}

.room-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tab-button {
  width: 52px;
  height: 52px;
  border: 3px solid #d5d9df;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  color: #adb4bf;
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.tab-button.is-active {
  border-color: #a8c6e8;
  background: #eaf5fb;
  color: #4a83ac;
}

.tab-button:hover,
.tab-button:focus-visible {
  border-color: #91b6e0;
  outline: none;
}

.items-frame {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  min-height: 680px;
  padding: 22px;
  border: 4px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.items-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 24px 28px;
}

.item-card {
  margin: 0;
  min-width: 0;
  text-align: center;
}

.item-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  background: #f2f6fa;
  box-shadow: 0 8px 22px rgba(54, 70, 95, 0.08);
}

.item-card figcaption {
  margin-top: 8px;
  color: #33313b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@media (max-width: 840px) {
  .app-shell {
    width: min(calc(100% - 24px), 720px);
    padding-top: 24px;
  }

  .carousel {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 8px;
  }

  .arrow-button {
    width: 44px;
    height: 44px;
    font-size: 1.45rem;
  }

  .room-card {
    width: min(420px, 74vw);
  }

  .room-card.is-prev {
    transform: translate(-108%, -50%) scale(0.72);
  }

  .room-card.is-next {
    transform: translate(8%, -50%) scale(0.72);
  }

  .room-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .room-tabs {
    justify-content: flex-start;
  }

  .items-grid {
    grid-template-columns: repeat(3, minmax(96px, 1fr));
    gap: 20px 16px;
  }
}

@media (max-width: 560px) {
  .home-view {
    justify-content: flex-start;
  }

  .home-header h1 {
    font-size: 3.1rem;
  }

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

  .carousel-stage {
    height: 380px;
    order: 1;
  }

  .arrow-button {
    position: absolute;
    z-index: 6;
    top: 51%;
  }

  #prevBtn {
    left: 18px;
  }

  #nextBtn {
    right: 18px;
  }

  .room-card {
    width: min(360px, 82vw);
  }

  .room-card.is-prev,
  .room-card.is-next {
    opacity: 0;
    pointer-events: none;
  }

  .room-title-wrap {
    gap: 14px;
  }

  .room-badge {
    width: 66px;
    height: 66px;
  }

  .room-header h1 {
    font-size: 2.4rem;
  }

  .items-frame {
    padding: 16px;
    border-width: 3px;
  }

  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    max-width: 296px;
    margin: 0 auto;
  }
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(115, 165, 216, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(47, 61, 84, 0.1);
}

.account-label,
.account-title,
.account-meta {
  margin: 0;
}

.account-label {
  color: #4a7da8;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-title {
  margin-top: 4px;
  color: var(--ink);
  font-weight: 800;
}

.account-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.account-actions a,
.auth-switch a {
  color: #2f6f9f;
  font-weight: 800;
  text-decoration: none;
}

.account-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(115, 165, 216, 0.45);
  border-radius: 8px;
  background: #fff;
}

.account-actions .primary-link {
  border-color: #4a7da8;
  background: #4a7da8;
  color: #fff;
}

.message-stack {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}

.message {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid rgba(135, 184, 143, 0.45);
  border-radius: 8px;
  background: rgba(135, 184, 143, 0.14);
  color: #315a36;
  font-weight: 700;
}

.auth-shell {
  width: min(520px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 32px 0;
}

.auth-card {
  width: 100%;
  padding: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.4rem;
}

.auth-copy,
.auth-switch {
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin: 22px 0;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(115, 165, 216, 0.5);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
}

.auth-form input:focus {
  outline: 3px solid rgba(115, 165, 216, 0.26);
  border-color: #4a7da8;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  font-weight: 700 !important;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.auth-form button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: #4a7da8;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.form-error {
  overflow-x: auto;
  padding: 12px 14px;
  border: 1px solid rgba(226, 154, 122, 0.5);
  border-radius: 8px;
  background: rgba(226, 154, 122, 0.14);
  color: #7b3e2a;
}

.login-gate {
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid rgba(226, 154, 122, 0.5);
  border-radius: 8px;
  background: rgba(255, 248, 242, 0.94);
  box-shadow: 0 18px 50px rgba(47, 61, 84, 0.1);
  text-align: center;
}

.login-gate:focus {
  outline: 3px solid rgba(226, 154, 122, 0.28);
}

.login-gate-title,
.login-gate-copy {
  margin: 0;
}

.login-gate-title {
  color: var(--ink);
  font-weight: 900;
}

.login-gate-copy {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.login-gate a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 18px;
  border-radius: 8px;
  background: #4a7da8;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.items-loading {
  grid-column: 1 / -1;
  margin: 32px 0;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

@media (max-width: 700px) {
  .account-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .account-actions {
    justify-content: flex-start;
  }
}
