.paste-grid {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  gap: 20px;
  padding: 0 26px 26px;
  align-items: start;
  flex: 1;
  min-height: 0;
}

.page--tall .paste-grid {
  align-items: stretch;
}
.page--tall .paste-grid .rail {
  max-height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}
.page--tall .paste-grid .log {
  max-height: 100%;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.rail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.rail-head .rail-label {
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.rail-head .rail-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}

.rail-minors {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finding-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.finding-actions .finding-more {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--color-accent-800);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}
.finding-actions .finding-more:hover {
  text-decoration: underline;
}

.plugins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.plugin-rest[hidden] {
  display: none;
}

.paste-log {
  min-height: 320px;
  height: 100%;
}

.log-jump {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--log-dim);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.log-jump:hover {
  color: var(--log-fg);
}

.bundle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 26px 16px;
}
.bundle .bundle-label {
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin-right: 4px;
}
.bundle a {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.bundle a:hover {
  background: var(--color-accent-100);
  color: var(--color-accent-800);
}
.bundle a[aria-current=page] {
  background: var(--color-accent);
  color: var(--color-bg);
}

.bundle-grid {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 20px;
  padding: 16px 26px 26px;
  align-items: start;
}

.bundle-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bundle-file {
  background: var(--color-surface);
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 13px 15px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.bundle-file:hover {
  border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
  color: inherit;
}
.bundle-file.is-active {
  background: var(--color-bg);
  border-color: var(--color-accent);
}
.bundle-file.is-active .bundle-file-name {
  font-weight: 700;
}

.bundle-file-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.bundle-file-name {
  font-family: var(--font-mono);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bundle-file-head .tag {
  margin-left: auto;
  flex: none;
  font-size: 10px;
}

.bundle-file-meta {
  font-size: 11.5px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
  margin-top: 4px;
}

.bundle-note {
  margin: 6px 2px 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: color-mix(in srgb, var(--color-text) 52%, transparent);
}

.bundle-log {
  max-height: 70vh;
}

.share-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.share-head .share-sub {
  font-size: 12.5px;
  color: color-mix(in srgb, var(--color-text) 58%, transparent);
  margin-top: 2px;
}

.share-preview {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: 14px 16px;
}
.share-preview .share-preview-label {
  font: 600 10.5px/1 var(--font-body);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
  margin-bottom: 10px;
}

.discord-embed {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
}
.discord-embed .discord-title {
  font: 700 12.5px var(--font-body);
}
.discord-embed .discord-body {
  font-size: 11.5px;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
  margin-top: 2px;
}
.discord-embed .discord-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-accent-700);
  margin-top: 5px;
}

.share-value {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--color-bg);
}

textarea.share-value {
  min-height: 74px;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: none;
  align-items: flex-end;
  background: color-mix(in srgb, var(--color-neutral-900) 45%, transparent);
}
.bottom-sheet.open {
  display: flex;
}

.bottom-sheet-card {
  width: 100%;
  background: var(--color-bg);
  border-radius: var(--radius-feature) var(--radius-feature) 0 0;
  padding: 12px 20px 34px;
  box-shadow: 0 -12px 32px rgba(32, 30, 29, 0.4);
  max-height: 82vh;
  overflow-y: auto;
  animation: sheet-up var(--t-slow) var(--ease);
}
.bottom-sheet-card h2 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
}
.bottom-sheet-card .bottom-sheet-body {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--color-text) 72%, transparent);
}

.bottom-sheet-grab {
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-text) 20%, transparent);
  margin: 0 auto 16px;
}

@keyframes sheet-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: none;
  }
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 16px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  background: var(--color-accent-2);
  color: var(--color-bg);
  font: 700 10px/20px var(--font-body);
  text-align: center;
}
.step code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: color-mix(in srgb, var(--color-text) 7%, transparent);
  padding: 1px 6px;
  border-radius: 999px;
}

.embed {
  padding: 0;
  height: 100vh;
}
.embed .shell {
  height: 100%;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
}
.embed .embed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
}
.embed .embed-head .embed-title {
  font: 700 13px var(--font-body);
}
.embed .log {
  flex: 1;
  border-radius: 0;
}

@media (max-width: 980px) {
  .paste-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 16px;
  }

  .page--tall {
    height: auto;
    overflow: visible;
  }

  .page--tall .paste-grid .rail {
    max-height: none;
    overflow: visible;
  }
  .page--tall .paste-grid .log {
    max-height: none;
  }

  .paste-log {
    min-height: 60vh;
  }

  .rail-context,
.rail-plugins {
    display: none;
  }

  .rail-context.is-open,
.rail-plugins.is-open {
    display: block;
  }

  .bundle {
    padding: 0 16px 12px;
  }
}
@media (max-width: 720px) {
  .head-actions .btn span {
    display: none;
  }

  .head-actions .btn {
    width: 40px;
    height: 40px;
    padding: 0;
  }

  .head-actions .btn-primary {
    width: auto;
    padding: var(--space-2) var(--space-4);
  }

  .head-actions .btn-primary span {
    display: inline;
  }
}
