html.rooftop-locker-open,
html.rooftop-locker-open body {
  overflow: hidden;
}

.rooftop-locker-dialog {
  box-sizing: border-box;
  width: min(900px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #f6f4e7;
  background: #101824;
  border: 1px solid #ffe43070;
  border-radius: 18px;
  box-shadow: 0 24px 100px #000a;
}

.rooftop-locker-dialog[open] {
  display: flex;
  flex-direction: column;
}

.rooftop-locker-dialog::backdrop {
  background: #060b16db;
}

.rooftop-locker-toolbar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid #344258;
  background: #172235;
}

.rooftop-locker-toolbar p {
  margin: 0;
  color: #c0cbdf;
  font-size: 12px;
  line-height: 1.4;
}

.rooftop-locker-close {
  flex-shrink: 0;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #ffe430;
  border-radius: 9px;
  color: #101824;
  background: #ffe430;
  font-size: 14px;
  font-weight: 800;
}

.rooftop-locker-close:hover {
  background: #fff27e;
}

.rooftop-locker-content {
  min-height: 0;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #7d889c #101824;
  -webkit-overflow-scrolling: touch;
}

.rooftop-locker-dialog .locker {
  margin: 0;
}

.rooftop-locker-dialog .locker-heading {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.rooftop-locker-dialog .locker-heading .kicker {
  margin-bottom: 8px;
}

.rooftop-locker-dialog .hat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rooftop-locker-dialog .hat-card canvas {
  max-width: 104px;
  touch-action: pan-y;
}

.rooftop-locker-dialog .hat-card button {
  min-height: 44px;
}

.rooftop-locker-dialog .save-note {
  margin-bottom: 0;
  line-height: 1.5;
}

.cabinet-mode .cabinet-collection[hidden] {
  display: none;
}

@media (max-width: 600px) {
  .rooftop-locker-dialog {
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
  }

  .rooftop-locker-toolbar {
    padding: 10px 12px;
    gap: 10px;
  }

  .rooftop-locker-content {
    padding: 16px 12px;
  }

  .rooftop-locker-dialog .locker h2 {
    font-size: 25px;
  }

  .rooftop-locker-dialog .locker-heading > span {
    font-size: 12px;
  }

  .rooftop-locker-dialog .hat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .rooftop-locker-dialog .hat-card {
    padding: 10px 8px;
  }

  .rooftop-locker-dialog .hat-card canvas {
    max-width: 84px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .rooftop-locker-dialog {
    width: calc(100% - 24px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .rooftop-locker-toolbar {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
