:root {
    --bg-primary: light-dark(#fafaf8, #0f0f0d);
    --bg-secondary: light-dark(#f5f5f3, #1a1a18);
    --bg-tertiary: light-dark(#efefed, #242422);
    --text-primary: light-dark(#1a1a18, #fafaf8);
    --text-secondary: light-dark(#6b7280, #a1a99f);
    --border: light-dark(#e5e5e3, #333331);
    --accent: light-dark(#0d6e6e, #4ecdc4);
    --accent-dark: light-dark(#075555, #3ab5b0);

    font-family:
      system-ui,
      -apple-system,
      sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  html,
  body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    color: var(--text-primary);
  }

  * {
    box-sizing: border-box;
  }

  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    gap: 12px;
  }

  .grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    gap: 0;
    width: 100%;
    max-width: 950px;
    height: 420px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
  }

  .panel {
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border);
    position: relative;
  }

  .panel-a {
    grid-row: 1 / 3;
    grid-column: 1;
    border-right: none;
    border-bottom: none;
  }

  .panel-b {
    grid-row: 2;
    grid-column: 1;
    border-right: none;
    border-top: none;
  }

  .panel-c {
    grid-row: 1 / 3;
    grid-column: 2;
    border-left: none;
    overflow: clip;
  }

  h1 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
  }

  .hotel-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
  }

  .address {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  .location-text {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
  }
  .small-map {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 12px;
  }

  .large-map {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    min-height: 380px;
  }

  .view-state-2 {
    display: none;
  }

  [data-state="2"] .view-state-1 {
    display: none;
  }

  [data-state="2"] .view-state-2 {
    display: block;
  }

  .directions {
    margin: 0;
    padding-left: 20px;
    list-style: decimal;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
  }

  .directions li {
    margin-bottom: 8px;
  }

  .rooms-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    overflow-y: auto;
  }

  .room-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .room-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
  }

  .room-card h3 {
    margin: 8px 12px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
  }

  .room-card p {
    margin: 0 12px 8px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
  }

  .price {
    display: inline-block;
    margin: 0 12px 12px;
    padding: 4px 10px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
  }

  .toggle-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    user-select: none;
    cursor: pointer;
  }

  @media (max-width: 512px) {
    .grid {
      grid-template-columns: 1fr;
      grid-template-rows: auto auto auto;
      max-width: 100%;
      height: auto;
    }

    .panel-a {
      grid-row: 1;
      grid-column: 1;
      border-right: 1px solid var(--border);
      border-bottom: 1px solid var(--border);
    }

    .panel-b {
      grid-row: 2;
      grid-column: 1;
      border-right: 1px solid var(--border);
      border-top: 1px solid var(--border);
    }

    .panel-c {
      grid-row: 3;
      grid-column: 1;
      border-left: 1px solid var(--border);
      border-top: 1px solid var(--border);
      max-height: 300px;
    }

    .small-map {
      height: 150px;
    }

    .hotel-image {
      height: 120px;
    }
  }

  :root {
    view-transition-name: none;
  }
  ::view-transition-group(map){
    z-index: 1;
  }
  ::view-transition-old(*):only-child {
    animation-name: slide-out;
  }
  ::view-transition-new(*):only-child {
    animation-name: slide-in;
  }

  @keyframes slide-out {
    to {
      transform: translateY(150px);
      opacity: 0;
    }
  }
  @keyframes slide-in {
    from {
      transform: translateY(-150px);
      opacity: 0;
    }
  }