body.android-player.pirate-web-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #edf7f5;
}

.pirate-web-preview #pirate-web-toolbar,
.pirate-web-preview #pirate-app {
  width: min(100%, 480px);
  flex: none;
}

.pirate-web-preview #pirate-web-toolbar {
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: calc(4px + env(safe-area-inset-top, 0px)) 12px 4px;
  border-bottom: 1px solid #d5b875;
  background: #fff9eb;
  color: #153f53;
  font-size: 13px;
}

.pirate-web-preview #pirate-web-toolbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 10px;
  border: 1px solid #c69838;
  border-radius: 9px;
  background: #fffdf6;
  color: #153f53;
  font-size: 12px;
  text-decoration: none;
}

.pirate-web-preview #pirate-web-storage {
  flex-basis: 100%;
  font-size: 12px;
  line-height: 1.4;
}

.pirate-web-preview #pirate-app .info-overlay {
  position: absolute;
}

.pirate-web-preview #pirate-app {
  container: pirate-game / size;
}

/* The preview toolbar reduces the room available to the shipyard. */
@container pirate-game (max-height: 820px) {
  .meta-window.v25-shipyard {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 0;
  }

  .v25-shipyard .vessel-preview.workshop-scene {
    flex: none;
    min-height: 204px;
    height: 204px;
  }

  .v25-shipyard.classic-ships .vessel-preview.workshop-scene {
    min-height: 184px;
    height: 184px;
  }

  .v25-shipyard .workshop-drawer {
    flex: none;
    height: auto;
    overflow: visible;
  }

  .v25-shipyard .part-selection {
    flex: none;
    min-height: 70px;
  }
}

.pirate-web-preview :is(button, a):focus-visible {
  outline: 3px solid #153f53;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff8e3;
}
