:root {
  --share-bg: #edf2f7;
  --share-card: #ffffff;
  --share-border: #d3deea;
  --share-text: #172034;
  --share-muted: #6c7b90;
  --share-empty: #f4f7fb;
  --slot-min-width: 96px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: radial-gradient(circle at 0% -20%, #d7eefc 0%, var(--share-bg) 48%, #e8edf5 100%);
  color: var(--share-text);
  font: 14px/1.5 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

.share-wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 14px 24px;
}

.share-toolbar {
  margin-top: 10px;
  border: 1px solid #d8e3ee;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
}

.share-hero {
  margin: 14px 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #d5e1ed;
  background: linear-gradient(135deg, #fefefe 0%, #f5f9ff 100%);
  box-shadow: 0 8px 20px rgba(12, 21, 38, 0.06);
}

.share-subtitle {
  margin: 0;
  color: #334155;
}

.quick-search {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #d6e3ef;
  border-radius: 12px;
  background: #f8fbff;
}

.quick-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

#global-search-input {
  width: 100%;
  border: 1px solid #bfccda;
  border-radius: 8px;
  padding: 0 12px;
  min-height: 42px;
  font: inherit;
  background: #ffffff;
}

#global-search-input:focus {
  outline: none;
  border-color: #4aa3d8;
  box-shadow: 0 0 0 3px rgba(74, 163, 216, 0.18);
}

#global-search-status {
  min-height: 22px;
  margin-top: 8px;
}

.quick-search-results {
  margin-top: 4px;
  max-height: 260px;
  overflow: auto;
  padding: 0;
}

.quick-search-results .result-item {
  background: #ffffff;
}

.result-action {
  color: #0f4b78;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.share-controls {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--share-border);
  border-radius: 999px;
  background: #fff;
}

.switch input {
  margin: 0;
}

.name-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--share-border);
  border-radius: 999px;
  background: #fff;
  color: #334155;
}

#export-name {
  width: 138px;
  border: 1px solid #c9d7e6;
  border-radius: 999px;
  padding: 4px 10px;
  min-height: 30px;
  font: inherit;
  color: #0f172a;
  background: #f8fbff;
}

#export-name:focus {
  outline: none;
  border-color: #4aa3d8;
  box-shadow: 0 0 0 3px rgba(74, 163, 216, 0.18);
  background: #fff;
}

.share-meta {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

#selected-count {
  font-weight: 700;
}

.year-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.year-row {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 8px;
  align-items: stretch;
}

.year-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 12px;
  border: 1px solid #ff8d8d;
  background: linear-gradient(180deg, #ff595f 0%, #ff4145 100%);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 8px 18px rgba(255, 77, 79, 0.25);
  padding: 8px 6px;
}

.year-row-group .year-label {
  font-size: 15px;
}

.slot-track {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #d4e0eb;
  border-radius: 12px;
  background: #f9fbff;
  padding: 8px;
  -webkit-overflow-scrolling: touch;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(var(--slot-min-width), 1fr));
  gap: 8px;
  min-width: calc(var(--slot-min-width) * 8 + 56px);
}

.slot {
  position: relative;
  width: 100%;
  min-height: 164px;
  border: 1px solid var(--share-border);
  border-radius: 10px;
  background: var(--share-card);
  overflow: hidden;
  padding: 3px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.slot:hover {
  transform: translateY(-1px);
  border-color: #95c6e8;
  box-shadow: 0 10px 20px rgba(22, 34, 50, 0.12);
}

.slot-index {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  font-size: 11px;
  color: #8a96a8;
  font-weight: 700;
}

.slot-has-item {
  padding: 0;
}

.slot-has-item .slot-index {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.slot-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #d9e4ef;
}

.slot-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 6px 7px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid rgba(15, 23, 42, 0.14);
}

.slot-overlay-title {
  margin: 0;
  color: #111827;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slot-empty {
  border-style: dashed;
  border-color: #bfccda;
  background: var(--share-empty);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 158px;
  gap: 3px;
  color: #8b9ab0;
}

.slot-empty .plus {
  font-size: 22px;
  line-height: 1;
}

.slot-empty .tip {
  font-size: 12px;
  font-weight: 700;
}

.slot-text {
  border-color: #c9d4e2;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.slot-text .slot-text-box {
  display: flex;
  min-height: 158px;
  padding: 16px 8px 8px;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
}

.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 14, 24, 0.58);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 120;
}

.search-modal.show {
  display: flex;
}

.search-panel {
  width: min(920px, 94vw);
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #d8e3ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(2, 8, 20, 0.4);
}

.search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #e4ecf4;
}

.search-head h2 {
  margin: 0;
  font-size: 18px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #c7d4e2;
  border-radius: 8px;
  font-size: 24px;
  line-height: 1;
  background: #fff;
  color: #556279;
  cursor: pointer;
}

.search-row {
  padding: 12px 14px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

#search-input {
  width: 100%;
  border: 1px solid #bfccda;
  border-radius: 8px;
  padding: 0 10px;
  min-height: 38px;
  font: inherit;
}
.search-recommend {
  padding: 0 14px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reco-btn {
  padding: 0.32rem 0.62rem;
  font-size: 13px;
}

#clear-slot {
  margin: 0 14px 8px;
}

#search-status {
  min-height: 22px;
  padding: 0 14px 6px;
}

.search-results {
  overflow: auto;
  padding: 0 14px 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.result-item {
  width: 100%;
  border: 1px solid #d4e0eb;
  border-radius: 10px;
  background: #fdfefe;
  padding: 8px;
  text-align: left;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  align-items: center;
  cursor: pointer;
}

.result-item:hover {
  border-color: #8cc6ea;
  background: #f3f9ff;
}

.result-item.is-taken,
.result-item:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  border-style: dashed;
  background: #f6f8fb;
}

.result-item.is-taken:hover,
.result-item:disabled:hover {
  border-color: #d4e0eb;
  background: #f6f8fb;
}

.result-cover {
  width: 56px;
  height: 74px;
  border-radius: 6px;
  object-fit: cover;
  background: #dce6ef;
}

.result-main {
  min-width: 0;
}

.result-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.result-sub {
  margin: 3px 0 0;
  color: var(--share-muted);
  font-size: 12px;
}

.result-score {
  color: #0f4b78;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}

.btn.danger-lite {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff1f2;
}

.peer-panel {
  width: min(760px, 94vw);
}

.peer-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

#peer-status {
  min-height: 20px;
}

.peer-result {
  display: grid;
  gap: 10px;
}

.peer-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.peer-metric {
  border: 1px solid #d4e0eb;
  border-radius: 10px;
  background: #f9fcff;
  padding: 8px;
}

.peer-metric .k {
  color: #607086;
  font-size: 12px;
}

.peer-metric .v {
  margin-top: 2px;
  font-weight: 800;
  font-size: 18px;
  color: #10243d;
}

.peer-list {
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #fff;
  padding: 8px;
  max-height: 220px;
  overflow: auto;
}

.peer-list-item {
  padding: 4px 2px;
  border-bottom: 1px dashed #e6edf5;
  font-size: 13px;
}

.peer-list-item:last-child {
  border-bottom: none;
}

.peer-chip {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #cfe3f4;
  color: #0f4b78;
  background: #edf7ff;
}
.share-footer {
  margin-top: 18px;
  padding: 12px 0 2px;
  color: #506177;
  text-align: center;
}

.share-footer-line {
  height: 1px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, rgba(80, 97, 119, 0), rgba(80, 97, 119, 0.42), rgba(80, 97, 119, 0));
}

.share-footer p {
  margin: 0;
  font-size: 14px;
}

.share-footer a {
  color: #0a7cc2;
  font-weight: 700;
}

@media (max-width: 1080px) {
  :root {
    --slot-min-width: 82px;
  }

  .year-row {
    grid-template-columns: 84px 1fr;
  }

  .slot,
  .slot-empty,
  .slot-text .slot-text-box {
    min-height: 146px;
  }
}

@media (max-width: 760px) {
  .peer-metrics {
    grid-template-columns: 1fr;
  }
  .peer-panel {
    width: min(94vw, 94vw);
  }
  :root {
    --slot-min-width: 68px;
  }

  .share-wrap {
    padding: 0 10px 20px;
  }

  .year-row {
    grid-template-columns: 72px 1fr;
  }

  .year-label {
    font-size: 14px;
    padding: 8px 4px;
  }

  .share-controls {
    gap: 8px;
  }

  .quick-search {
    padding: 8px;
  }

  .quick-search-row {
    grid-template-columns: 1fr;
  }

  #global-search-btn {
    width: 100%;
  }

  .quick-search-results {
    max-height: 220px;
  }
  .name-input-wrap {
    width: 100%;
    justify-content: space-between;
  }

  #export-name {
    width: 58%;
    min-width: 132px;
  }

  .slot {
    min-height: 130px;
  }

  .slot-empty,
  .slot-text .slot-text-box {
    min-height: 124px;
  }

  .slot-overlay-title {
    font-size: 11px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-recommend {
    gap: 6px;
  }

  .result-item {
    grid-template-columns: 50px 1fr;
  }

  .result-cover {
    width: 50px;
    height: 66px;
  }

  .result-score {
    grid-column: 2;
    justify-self: end;
  }
}

@media (max-width: 520px) {
  :root {
    --slot-min-width: 62px;
  }

  .year-row {
    grid-template-columns: 64px 1fr;
  }

  .year-label {
    font-size: 13px;
  }
}
.peer-open-btn {
  border-color: #f3c06a;
  background: linear-gradient(180deg, #fff8dc 0%, #ffe8b3 100%);
  color: #7a4300;
  font-weight: 700;
}

.peer-open-btn:hover {
  border-color: #e4ab47;
  background: linear-gradient(180deg, #fff3cd 0%, #ffd991 100%);
}

.peer-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.peer-toggle-btn {
  min-height: 30px;
  padding: 4px 10px;
  border-color: #c8d7e6;
  background: #fff;
  color: #17324f;
  font-weight: 700;
}

@media (max-width: 760px) {
  .peer-list-tools {
    flex-direction: column;
    align-items: flex-start;
  }
}

.peer-vibe {
  border: 1px solid #f6d79d;
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fff8e8 0%, #fffbf2 100%);
  color: #7a4300;
  font-weight: 700;
}

.peer-actions-main,
.peer-actions-io {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, auto);
  gap: 8px;
  align-items: center;
}

.peer-actions-io {
  grid-template-columns: 1.3fr repeat(2, auto);
}

.peer-select,
.peer-name-input {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c5d3e2;
  border-radius: 8px;
  padding: 0 10px;
  font: inherit;
  background: #fff;
  color: #13253f;
}

.peer-select:focus,
.peer-name-input:focus {
  outline: none;
  border-color: #4aa3d8;
  box-shadow: 0 0 0 3px rgba(74, 163, 216, 0.18);
}

.peer-vibe {
  border: 1px solid #f6d79d;
  border-radius: 10px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fff8e8 0%, #fffbf2 100%);
  color: #7a4300;
  font-weight: 700;
}

@media (max-width: 860px) {
  .peer-actions-main,
  .peer-actions-io {
    grid-template-columns: 1fr;
  }
}

.peer-vs {
  font-weight: 700;
  color: #1c314d;
}

#peer-apply[data-locked="1"],
#peer-delete[data-locked="1"] {
  opacity: 0.72;
}

.trend-open-btn {
  border-color: #f3c06a;
  background: linear-gradient(180deg, #fff8dc 0%, #ffe8b3 100%);
  color: #7a4300;
  font-weight: 800;
}

.trend-open-btn:hover {
  border-color: #e4ab47;
  background: linear-gradient(180deg, #fff3cd 0%, #ffd991 100%);
}

