/* 在线缩水 */
.shrink-wrap {
  padding: 28px 0 56px;
  background: linear-gradient(180deg, #eef3fa 0%, #f7f9fc 40%, #fff 100%);
  min-height: 70vh;
}

.shrink-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.shrink-title h1 {
  margin: 0 0 4px;
  font-size: 28px;
  color: #0b3a8c;
}

.shrink-title p {
  margin: 0;
  color: #6b7c8f;
  font-size: 14px;
}

.shrink-member {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
}

.shrink-member em {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.shrink-member em.ok { background: #e8f5e9; color: #2e7d32; }
.shrink-member em.warn { background: #fff3e0; color: #e65100; }

.shrink-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px;
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 10px;
}

.shrink-type-tabs a {
  padding: 8px 14px;
  border-radius: 6px;
  color: #334;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.shrink-type-tabs a:hover { background: #f0f5fb; }
.shrink-type-tabs a.active {
  background: #1b6fe8;
  color: #fff;
}

.shrink-gate {
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 48px 28px;
  text-align: center;
  max-width: 640px;
  margin: 24px auto;
}

.shrink-gate h2 { margin: 0 0 10px; color: #0b3a8c; }
.shrink-gate p { color: #6b7c8f; margin: 0 0 22px; }
.shrink-gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.shrink-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.shrink-left,
.shrink-right {
  background: #fff;
  border: 1px solid #d0dbeb;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 4px 18px rgba(15, 45, 90, 0.04);
}

.shrink-draw {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #456;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dde5f0;
}

.shrink-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.shrink-subtabs button {
  border: 1px solid #c5d2e4;
  background: #f5f8fc;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.shrink-subtabs button.active {
  background: #ffefd6;
  border-color: #f0b25a;
  color: #8a4b00;
  font-weight: 700;
}

.shrink-pool {
  margin-bottom: 12px;
}

.pool-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.pool-label {
  flex: 0 0 42px;
  font-size: 12px;
  color: #6b7c8f;
  padding-top: 8px;
}

.ball-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  flex: 1;
}

.ball {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e0a0a0;
  background: #fff5f5;
  color: #c62828;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.ball.blue {
  border-color: #90b4e8;
  background: #f0f6ff;
  color: #1565c0;
}

.ball.on {
  background: #e53935;
  border-color: #c62828;
  color: #fff;
}

.ball.blue.on {
  background: #1e88e5;
  border-color: #1565c0;
  color: #fff;
}

.pool-tools {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pool-tools button {
  width: 28px;
  height: 28px;
  border: 1px solid #c5d2e4;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.shrink-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 12px;
  max-height: none;
}

.fbtn {
  border: 1px solid #c9d5e6;
  background: linear-gradient(180deg, #fff 0%, #f3f7fc 100%);
  border-radius: 4px;
  padding: 7px 4px;
  font-size: 12px;
  cursor: pointer;
  color: #234;
  line-height: 1.2;
  min-height: 34px;
}

.fbtn:hover { border-color: #1b6fe8; color: #1b6fe8; }
.fbtn.set {
  background: #fff3e0;
  border-color: #ff9800;
  color: #e65100;
  font-weight: 700;
}

.shrink-left-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.sk-btn {
  border: 1px solid #b8c7db;
  background: #f5f8fc;
  color: #234;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.sk-btn:hover { filter: brightness(0.97); }
.sk-primary {
  background: #e53935;
  border-color: #c62828;
  color: #fff;
}
.sk-orange {
  background: #ffe0c2;
  border-color: #f0b07a;
  color: #8a3b00;
}

.shrink-tip {
  margin: 0;
  font-size: 12px;
  color: #8a97a8;
}

.shrink-result-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.shrink-result-tabs button {
  border: 1px solid #c5d2e4;
  background: #f5f8fc;
  padding: 6px 12px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  font-size: 13px;
}

.shrink-result-tabs button.active {
  background: #fff;
  border-bottom-color: #fff;
  font-weight: 700;
  color: #0b3a8c;
}

.shrink-result-meta {
  font-size: 13px;
  color: #456;
  margin-bottom: 6px;
}

.shrink-table-wrap {
  border: 1px solid #d5deea;
  border-radius: 6px;
  max-height: 420px;
  overflow: auto;
  margin-bottom: 10px;
}

.shrink-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.shrink-table th,
.shrink-table td {
  border-bottom: 1px solid #e8eef6;
  padding: 7px 8px;
  text-align: left;
}

.shrink-table th {
  background: #f5f8fc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.shrink-table .empty {
  text-align: center;
  color: #99a;
  padding: 28px 8px;
}

.shrink-table .nums { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.5px; }
.shrink-table .del {
  color: #c62828;
  cursor: pointer;
  border: 0;
  background: none;
  font-size: 12px;
}

.shrink-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shrink-review {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #dde5f0;
}

.shrink-review label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.shrink-review input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c5d2e4;
  border-radius: 4px;
  margin-bottom: 8px;
}

.shrink-review pre {
  background: #f5f8fc;
  border: 1px solid #e0e7f0;
  padding: 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: pre-wrap;
  min-height: 48px;
}

/* 条件弹层 */
.sk-modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 30, 60, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* display:flex 会盖掉 UA 的 [hidden]{display:none}，关闭弹窗必须显式隐藏 */
.sk-modal-mask[hidden] {
  display: none !important;
}

.sk-modal {
  background: #fff;
  border-radius: 10px;
  width: min(420px, 100%);
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  overflow: hidden;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.sk-modal h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #0b3a8c;
}

.sk-modal p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6b7c8f;
}

.sk-modal .row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px 10px;
  align-items: center;
  margin-bottom: 12px;
}

.sk-modal .row label { margin: 0; }

.sk-modal select,
.sk-modal input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #c5d2e4;
  border-radius: 4px;
}

.sk-modal input[type="number"],
.sk-modal input[type="text"] {
  flex: 1;
}

.sk-modal .actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* 注册/登录 */
.auth-page {
  padding: 32px 0 64px;
  display: flex;
  justify-content: center;
}

.auth-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  padding: 28px 26px;
  box-shadow: 0 8px 28px rgba(15, 45, 90, 0.06);
}

.auth-card h2 { margin: 0 0 6px; color: #0b3a8c; }
.auth-hint { margin: 0 0 16px; color: #6b7c8f; font-size: 14px; }
.auth-alert {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 14px;
  font-size: 14px;
}
.auth-alert.auth-ok {
  background: #e8f5e9;
  color: #2e7d32;
  border-color: #c8e6c9;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 10px 0 6px;
  color: #345;
}

.auth-form .req { color: #e53935; }
.auth-form .opt { color: #99a; font-weight: 500; font-size: 12px; }

.auth-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c5d2e4;
  border-radius: 6px;
  font-size: 14px;
}

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.captcha-row input { flex: 1; }
.captcha-img {
  border: 1px solid #c5d2e4;
  border-radius: 6px;
  cursor: pointer;
  height: 40px;
  background: #f5f8fc;
}

.auth-submit { width: 100%; margin-top: 18px; justify-content: center; }
.auth-switch { text-align: center; margin: 16px 0 0; font-size: 14px; color: #6b7c8f; }

.nav-shrink-link {
  color: #e65100 !important;
  font-weight: 800 !important;
}

@media (max-width: 980px) {
  .shrink-layout { grid-template-columns: 1fr; }
  .shrink-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .shrink-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shrink-title h1 { font-size: 22px; }
}
