/* Dense, readable listings that keep item navigation separate from management. */
.collection-layout {
  width: min(100%, 1016px);
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.collection-heading,
.collection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.collection-heading .secondary-button {
  background: #225f40;
  flex-shrink: 0;
  gap: 10px;
}
.collection-site .collection-heading h1 {
  font-size: clamp(28px, 4vw, 36px);
}
.collection-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.6fr) auto;
  gap: 16px;
  align-items: end;
}
.collection-tools label {
  min-width: 0;
  font-weight: 700;
  display: grid;
  gap: 8px;
}
.collection-tools.alert-list-tools {
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.5fr);
}
.collection-tools select {
  min-height: 48px;
  width: 100%;
  min-width: 0;
  border: 2px solid #7fad90;
  border-radius: 7px;
  color: #143822;
  background: #fafffb;
  padding: 10px;
  font-size: 16px;
}
.account-site .collection-tools {
  padding: 20px;
}
.collection-meta {
  color: #123e27;
  margin: 24px 0 14px;
  font-size: 14px;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.account-site .collection-meta p {
  margin: 0;
  font-weight: 800;
}
.collection-site .collection-note {
  font-size: 14px;
  color: #153e28;
  margin-top: 18px;
}
.collection-note:empty {
  display: none;
}
.saved-list {
  display: grid;
  gap: 16px;
}
.account-site .saved-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  margin: 0;
}
.saved-item-link,
.alert-item-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  text-decoration: none;
}
.saved-item-link {
  min-height: 56px;
}
.saved-item-name {
  color: #f3ffec;
  font: 800 18px/1.35 var(--font);
  overflow-wrap: anywhere;
  text-decoration: none;
}
.saved-item-name:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.saved-item-name small {
  display: block;
  margin-top: 6px;
  color: #d0e4c7;
  font: 400 13px/1.4 var(--body);
}
.saved-row .tick,
.alert-card .tick {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 9px;
}
.listing-price {
  display: grid;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  text-align: right;
}
.listing-price > small {
  color: #d0e4c7;
  font-size: 12px;
  line-height: 1.3;
}
.listing-price > strong {
  color: #e3ffae;
  font: 800 22px/1.3 var(--font);
  overflow-wrap: anywhere;
}
.listing-price strong small {
  font-size: 12px;
}
.listing-price > span {
  color: #d0e4c7;
  font-size: 12px;
  line-height: 1.4;
}
.saved-row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-site .saved-row-actions .secondary-button {
  font-size: 14px;
  min-height: 44px;
  padding: 8px 12px;
}
.remove-saved,
.delete-alert {
  min-height: 44px;
  padding: 8px;
  color: #ffe0cf;
  font-weight: 700;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.remove-saved:hover,
.delete-alert:hover {
  color: white;
}
.collection-site .empty-alerts {
  background: #e2f1df;
  border: 2px solid #467851;
  box-shadow: 0 4px 0 #254b35;
}
.collection-site .empty-alerts .secondary-button {
  margin-top: 18px;
}
.collection-site .empty-alerts p {
  max-width: 440px;
  margin: 12px auto 0;
}
.collection-site .empty-alerts strong {
  font: 800 22px var(--font);
}
.undo-message {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.undo-message span {
  overflow-wrap: anywhere;
}
.undo-message button {
  min-height: 44px;
  padding: 8px 12px;
  background: #185c36;
  color: white;
  border: 2px solid #0b3920;
  border-radius: 7px;
  font-weight: 700;
}
.import-panel {
  border-color: #a6ba63;
}
.import-panel details {
  margin-bottom: 16px;
}
#watchlist-import-items {
  max-height: 180px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.account-site #watchlist-import-feedback {
  margin: 14px 0 0;
}
#watchlist-import-feedback:empty {
  display: none;
}
.account-site .alert-card {
  padding: 0;
  overflow: hidden;
}
.alert-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 90px;
  align-items: center;
  gap: 20px;
  padding: 20px;
  list-style: none;
}
.alert-summary::-webkit-details-marker {
  display: none;
}
.account-site details[open] .alert-summary {
  margin: 0;
}
.alert-summary:hover {
  background: #ffffff08;
}
.alert-summary .saved-item-name {
  display: inline-block;
  padding-block: 7px;
}
.alert-target-line {
  display: block;
  font-size: 14px;
  color: #d6eccd;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.alert-target-line strong {
  color: #f0ffcc;
}
.alert-summary-end {
  display: grid;
  justify-items: end;
  gap: 12px;
}
.collection-site .status-badge {
  color: #d5ffb1;
  font-size: 12px;
  border: 1px solid #7bad6c;
  background: #0b3828;
  border-radius: 6px;
  padding: 3px 8px;
}
.collection-site .status-badge.paused {
  color: #ffe0a3;
  border-color: #c4a464;
  background: #493e1d;
}
.expand-label {
  font-size: 13px;
  font-weight: 700;
  color: #e2f1db;
}
.expand-label span {
  display: inline-block;
  margin-left: 4px;
}
[open] .expand-label span {
  transform: rotate(180deg);
}
.alert-controls {
  border-top: 2px solid #0b3927;
  background: #103e2d;
  box-shadow: inset 0 2px 4px #061e2155;
  padding: 22px;
}
.account-site .alert-inline-form {
  margin-top: 18px;
  gap: 10px;
  max-width: 550px;
}
.target-edit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}
.alert-inline-form label {
  display: block !important;
}
.account-site .alert-inline-form .field-help {
  margin: 2px 0 0;
  font-size: 14px;
}
.account-site .row-error {
  margin: 16px 0 0;
}
.alert-controls .alert-actions {
  padding-top: 4px;
}
.collection-site #alerts-status {
  border: 2px solid #c6ae62;
}
.account-site .discord-panel {
  padding: 18px 22px;
}
.account-site .discord-panel .panel-heading {
  margin-bottom: 8px;
}
.account-site .discord-panel p {
  margin-bottom: 0;
}
.account-site .discord-panel #discord-options {
  margin-top: 10px;
}
.discord-panel #discord-connect {
  margin-top: 16px;
}
.collection-site #alert-editor {
  max-width: 620px;
}
.collection-site #saved-alerts-title {
  font-family: var(--font);
}
.account-site #alert-new {
  color: #173b22;
  background: #c1f493;
  border-color: #d3e78d;
}
@media (max-width: 700px) {
  .collection-layout {
    padding: 24px 16px 44px;
  }
  .collection-heading {
    align-items: center;
    gap: 8px;
  }
  .account-site .collection-heading .secondary-button {
    padding: 8px 12px;
    font-size: 14px;
  }
  .account-site .collection-tools {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 16px;
  }
  .collection-tools label:first-child {
    grid-column: 1 / -1;
  }
  .collection-tools.alert-list-tools {
    grid-template-columns: minmax(0, 1fr) 110px;
  }
  .alert-list-tools label:first-child {
    grid-column: auto;
  }
  .collection-tools label {
    font-size: 14px;
  }
  .collection-meta {
    margin-top: 20px;
  }
  .account-site .saved-row {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px 10px;
    padding: 16px;
  }
  .saved-item-name {
    font-size: 16px;
  }
  .saved-item-link,
  .alert-item-cell {
    gap: 10px;
  }
  .saved-row .tick,
  .alert-card .tick {
    width: 36px;
    height: 40px;
    font-size: 14px;
  }
  .listing-price > strong {
    font-size: 20px;
  }
  .listing-price > small,
  .listing-price > span {
    font-size: 11px;
  }
  .saved-row-actions {
    grid-column: 1 / -1;
    border-top: 1px solid #69a26b66;
    padding-top: 12px;
    justify-content: space-between;
  }
  .saved-row-actions > * {
    min-width: 96px;
  }
  .alert-summary {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 12px 10px;
    padding: 16px;
  }
  .alert-summary-end {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #69a26b66;
  }
  .alert-summary .saved-item-name {
    padding: 4px 0;
  }
  .alert-target-line {
    font-size: 12px;
  }
  .alert-controls {
    padding: 18px 16px;
  }
  .target-edit {
    grid-template-columns: minmax(0, 1fr);
  }
  .alert-controls .alert-actions {
    gap: 10px;
  }
  .delete-alert {
    width: 100%;
    text-align: left;
  }
  .account-site .discord-panel {
    padding: 16px;
  }
  .collection-site .toast {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 359px) {
  .saved-row .tick,
  .alert-card .tick {
    display: none;
  }
  .account-site .saved-row,
  .alert-summary {
    padding: 14px;
  }
}
