.bookmark-page {
  padding: 82px 0 110px;
}

.bookmark-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 42px;
  animation: enter 0.7s both;
}

.bookmark-hero h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.bookmark-hero h1 em {
  color: var(--accent-2);
  font-style: normal;
}

.bookmark-hero .lead {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.legal-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 46px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 179, 71, 0.32);
  border-radius: 10px;
  background: rgba(255, 179, 71, 0.08);
  color: var(--ink);
  font-size: 14px;
}

.legal-warning span {
  color: #ffb347;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 46px;
}

.category-tabs a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: 0.2s;
}

.category-tabs a:hover,
.category-tabs a[aria-current="page"] {
  border-color: rgba(181, 255, 98, 0.62);
  background: rgba(181, 255, 98, 0.1);
  color: var(--accent);
}

.bookmark-section {
  margin-top: 54px;
}

.bookmark-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
}

.bookmark-section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: -0.04em;
}

.bookmark-section-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

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

.link-card {
  min-height: 215px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.22s;
}

.link-card:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 255, 98, 0.58);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.link-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-icon {
  width: 44px;
  height: 44px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  object-fit: contain;
}

.open-mark {
  color: var(--accent);
  font: 17px "DM Mono", monospace;
}

.link-card h3 {
  margin: 24px 0 6px;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.link-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.link-card .domain {
  margin-top: auto;
  padding-top: 22px;
  color: var(--accent-2);
  font: 10px "DM Mono", monospace;
  word-break: break-all;
}

.network-widget {
  margin: 4px 0 58px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(22, 31, 57, 0.82), rgba(11, 16, 32, 0.58));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.18);
}

body.light .network-widget {
  background: rgba(255, 255, 255, 0.72);
}

.network-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.network-widget-head h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 37px);
  letter-spacing: -0.04em;
}

.refresh-network {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.refresh-network:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.network-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.network-card {
  position: relative;
  min-height: 210px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.network-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(155, 169, 255, 0.2), transparent 65%);
}

.network-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.network-card-title small {
  color: var(--muted);
  font-weight: 500;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffc55c;
  box-shadow: 0 0 13px rgba(255, 197, 92, 0.75);
}

.network-card.ready .status-dot {
  background: #52d977;
  box-shadow: 0 0 13px rgba(82, 217, 119, 0.75);
}

.network-card.failed .status-dot {
  background: #ff7280;
  box-shadow: 0 0 13px rgba(255, 114, 128, 0.65);
}

.ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 27px 0 5px;
}

.ip-value {
  color: #63b9ff;
  font: 600 clamp(19px, 3vw, 27px) "DM Mono", monospace;
  word-break: break-all;
}

.inspect-ip {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: rgba(99, 185, 255, 0.1);
  color: #63b9ff;
  font-size: 17px;
  cursor: pointer;
}

.inspect-ip:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.network-meta,
.network-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.network-note {
  margin-top: 7px;
}

.network-source {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.network-source a {
  color: var(--accent-2);
}

.ip-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: min(820px, calc(100vh - 34px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0e1425;
  color: var(--ink);
  box-shadow: 0 35px 120px rgba(0, 0, 0, 0.72);
}

.ip-dialog::backdrop {
  background: rgba(4, 7, 14, 0.76);
  backdrop-filter: blur(9px);
}

body.light .ip-dialog {
  background: #f7f8ff;
}

.dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  background: inherit;
}

.dialog-head h2 {
  margin: 0;
  font-size: 24px;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

.ip-map {
  width: 100%;
  height: 300px;
  border: 0;
  background: rgba(255, 255, 255, 0.04);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 22px;
}

.detail-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.detail-panel h3 {
  margin: 0 0 13px;
  color: var(--accent);
  font-size: 15px;
}

.detail-list {
  display: grid;
  grid-template-columns: minmax(85px, 0.7fr) minmax(0, 1.3fr);
  gap: 9px 12px;
  margin: 0;
  font-size: 13px;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
  word-break: break-word;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.security-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
}

.security-item b {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.page-note {
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: color-mix(in srgb, var(--muted) 72%, transparent);
  font-size: 12px;
}

.page-note a {
  color: inherit;
}

.article-index {
  padding: 88px 0 120px;
}

.article-index .section-heading {
  margin-bottom: 38px;
}

.article-index .section-heading h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

@media (max-width: 840px) {
  .bookmark-hero,
  .network-cards {
    grid-template-columns: 1fr;
  }

  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .bookmark-page {
    padding-top: 58px;
  }

  .bookmark-hero,
  .bookmark-section-heading {
    display: block;
  }

  .bookmark-hero .lead {
    margin-top: 22px;
  }

  .bookmark-section-heading p {
    margin-top: 8px;
    text-align: left;
  }

  .link-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .network-widget {
    padding: 17px;
  }

  .network-widget-head {
    align-items: flex-start;
  }

  .link-card {
    min-height: 190px;
  }

  .ip-map {
    height: 230px;
  }
}
