.ranker-top h1 {
  letter-spacing: 0;
}

.ranker-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 18px 0 24px;
}

.ranker-top h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ranker-top p {
  margin: 12px 0 0;
  max-width: 560px;
  color: var(--muted);
}

.ranker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

[hidden] {
  display: none !important;
}

button.play,
.ghost {
  background: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.ghost {
  padding: 7px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.ghost:hover {
  border-color: var(--text);
}

.list-name {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.list-name input,
.share-row input {
  flex: 1;
  max-width: 320px;
  padding: 7px 10px;
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.tiers {
  overflow: hidden;
}

.tier {
  display: grid;
  grid-template-columns: 96px 1fr minmax(32px, auto);
  min-height: 76px;
  border-top: 1px solid var(--border);
}

.tier:first-child {
  border-top: none;
}

.tier-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  font-size: 22px;
  font-weight: 800;
  color: #16191d;
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.1;
  cursor: text;
  outline: none;
}

.tier-label.long {
  font-size: 14px;
}

.tier-items {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 8px;
  min-height: 76px;
}

.tier.target .tier-items,
.pool.target {
  background: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue-border);
}

.tier-remove {
  border: none;
  border-left: 1px solid var(--border);
  background: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
}

.tier-remove:hover,
.tier-remove.sure {
  color: var(--red);
}

.tier-remove.sure {
  padding: 0 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
}

.tier-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 30px;
  font-size: 13px;
  color: var(--muted);
}

.pool-wrap h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 76px;
  padding: 8px;
}

.pool:empty::before {
  content: "Everything's ranked.";
  padding: 18px 8px;
  font-size: 14px;
  color: var(--muted);
}

.pick {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 78px;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: grab;
  color: var(--text);
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.pick .icon {
  width: 40px;
  height: 40px;
}

.pick.selected {
  border-color: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.pick.dragging {
  opacity: 0.35;
}

.pick.floating {
  position: fixed;
  z-index: 10;
  pointer-events: none;
  opacity: 0.95;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  cursor: grabbing;
}

.view .pick {
  cursor: pointer;
}

.view .pick:hover {
  border-color: var(--border-dark);
}

.share-box {
  margin-top: 24px;
  padding: 16px 18px;
}

.share-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.share-row .small-title {
  width: 52px;
}

.share-row input {
  max-width: none;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 12px;
}

.share-box p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.view .tier-items {
  min-height: 0;
}

.view .tier {
  grid-template-columns: 96px 1fr;
  min-height: 70px;
}

.view .tier-label {
  cursor: default;
}



body.embed {
  background: transparent;
  min-height: 0;
}

body.embed::before {
  display: none;
}

body.embed main,
body.embed .container {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

.embed-credit {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

@media (max-width: 760px) {
  .ranker-top h1 {
    font-size: 30px;
  }

  .tier,
  .view .tier {
    grid-template-columns: 64px 1fr minmax(28px, auto);
  }

  .view .tier {
    grid-template-columns: 64px 1fr;
  }

  .tier-label {
    font-size: 18px;
  }

  .pick {
    width: 66px;
    font-size: 10px;
  }

  .pick .icon {
    width: 34px;
    height: 34px;
  }

  .list-name {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .list-name input {
    max-width: none;
  }

  .share-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .share-row .small-title {
    width: 100%;
  }
}
