:root {
  color: #17202a;
  background: #eef1f4;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
}

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

p {
  margin: 6px 0 0;
  color: #5c6670;
}

.token-form {
  display: flex;
  gap: 8px;
}

input,
button {
  height: 36px;
  border: 1px solid #c6ccd2;
  border-radius: 6px;
  background: #fff;
  color: #17202a;
  font: inherit;
}

input {
  min-width: 220px;
  padding: 0 10px;
}

button {
  padding: 0 14px;
  cursor: pointer;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric,
.crane-card,
.onboarding {
  border: 1px solid #d7dde3;
  border-radius: 8px;
  background: #fff;
}

.onboarding {
  margin-bottom: 16px;
  padding: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.section-head h2,
.plan-block h3,
.ops-notes h3 {
  margin: 0;
}

.section-head h2 {
  font-size: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #c5d6e3;
  border-radius: 999px;
  background: #f3f8fc;
  color: #24587c;
  font-size: 13px;
  white-space: nowrap;
}

.planner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.planner-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e0e5ea;
  border-radius: 8px;
  background: #f9fafb;
}

.planner-form label {
  display: grid;
  gap: 5px;
  color: #59636d;
  font-size: 13px;
}

.planner-form input {
  min-width: 0;
  width: 100%;
}

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

.plan-block {
  min-width: 0;
  border: 1px solid #e0e5ea;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.plan-block h3,
.ops-notes h3 {
  font-size: 15px;
}

.plan-block pre {
  overflow: auto;
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 6px;
  background: #17202a;
  color: #f4f7fa;
  font-size: 12px;
  line-height: 1.5;
}

.hint {
  margin-top: 8px;
  font-size: 13px;
}

.ip-grid,
.mini-table {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.ip-grid div,
.mini-table div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 6px 10px;
  border-top: 1px solid #eef1f3;
  padding-top: 8px;
  font-size: 13px;
}

.ip-grid em {
  grid-column: 2;
  color: #68727c;
  font-style: normal;
}

.mini-table span {
  color: #59636d;
  word-break: break-all;
}

.ops-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.ops-notes > div {
  border: 1px solid #e0e5ea;
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfd;
}

.ops-notes ol {
  margin: 10px 0 0;
  padding-left: 20px;
  color: #3f4a54;
  font-size: 14px;
  line-height: 1.65;
}

.metric {
  padding: 14px;
}

.metric span {
  display: block;
  color: #6c7680;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.crane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.crane-card {
  padding: 16px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.card-title h2 {
  margin: 0;
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 13px;
  background: #e8edf2;
}

.status.ok {
  background: #dff5e7;
  color: #146c3b;
}

.status.bad {
  background: #ffe3df;
  color: #9c2d20;
}

.rows {
  display: grid;
  gap: 8px;
}

.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf0f2;
  padding-top: 8px;
  font-size: 14px;
}

.row span:first-child {
  color: #68727c;
}

.target-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.screenshot {
  display: block;
  margin-top: 12px;
  color: #43505a;
  text-decoration: none;
}

.screenshot img,
.screenshot-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #d7dde3;
  border-radius: 6px;
  background: #f4f6f8;
}

.screenshot img {
  object-fit: cover;
}

.screenshot-placeholder {
  display: grid;
  place-items: center;
  color: #68727c;
  font-size: 14px;
}

.screenshot span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #68727c;
}

.target {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid #edf0f2;
  padding-top: 8px;
  font-size: 14px;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid #c6d4e0;
  border-radius: 6px;
  color: #1f5d8f;
  text-decoration: none;
  background: #f7fbff;
}

.empty {
  border: 1px dashed #b7c0c8;
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  color: #68727c;
  background: #fff;
}

@media (max-width: 760px) {
  .shell {
    padding: 16px;
  }

  .topbar,
  .token-form {
    flex-direction: column;
    align-items: stretch;
  }

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

  .section-head,
  .planner,
  .planner-output,
  .ops-notes {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
  }

  .crane-grid {
    grid-template-columns: 1fr;
  }
}
