/* 青衿 · 桂林十八中 × 桂电 联合参赛版 */
:root {
  --ink: #12233d;
  --muted: #5a6d86;
  --line: rgba(11, 44, 92, 0.14);
  --paper: #f2f6fb;
  --panel: #ffffff;
  --navy: #0b2c5c;
  --sky: #2f9fd6;
  --crimson: #c62828;
  --gold: #e0a93a;
  --glow: rgba(47, 159, 214, 0.18);
  --pine: var(--navy);
  --leaf: var(--sky);
  --copper: var(--gold);
}

@keyframes sk-in {
  from { opacity: 0.01; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes sk-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 159, 214, 0.35); }
  50% { box-shadow: 0 0 0 12px rgba(47, 159, 214, 0); }
}

@keyframes sk-shine {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(47, 159, 214, 0.22), transparent 55%),
    radial-gradient(700px 420px at 96% 0%, rgba(11, 44, 92, 0.12), transparent 50%),
    linear-gradient(180deg, #eaf3fb 0%, var(--paper) 42%, #e7eef8 100%);
  background-attachment: fixed;
}

#app {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.sk-page {
  position: relative;
  width: 100%;
  max-width: 1160px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 0 104px;
  box-sizing: border-box;
  font-family: "PingFang SC", "Hiragino Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: transparent;
  animation: sk-in 0.45s ease both;
}

.sk-page * { box-sizing: border-box; }

.sk-brand {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 22px clamp(16px, 3vw, 32px) 14px;
  width: 100%;
}

.sk-brand-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sk-brand-logos img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 18px rgba(11, 44, 92, 0.12);
  transition: transform 0.25s ease;
}

.sk-brand-logos img:hover { transform: scale(1.05); }

.sk-brand-mark {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin: 0;
}

.sk-brand-mark em {
  font-style: italic;
  color: var(--sky);
  font-weight: 400;
}

.sk-brand-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.sk-brand-meta {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  line-height: 1.65;
}

.sk-brand-meta strong {
  display: block;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 2px;
}

.sk-partners {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 clamp(16px, 3vw, 32px) 14px;
}

.sk-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.sk-steps {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 8px;
  margin: 0 clamp(16px, 3vw, 32px) 20px;
  border-bottom: 1px solid var(--line);
}

.sk-steps button {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: var(--muted);
  padding: 14px 16px 12px;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.sk-steps button .n {
  display: inline-block;
  font-family: "Songti SC", serif;
  font-size: 15px;
  margin-right: 8px;
  opacity: 0.5;
}

.sk-steps button:hover { color: var(--navy); }

.sk-steps button.active {
  color: var(--navy);
  font-weight: 600;
}

.sk-steps button.active .n {
  opacity: 1;
  color: var(--sky);
}

.sk-steps button.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--navy), var(--sky));
}

.sk-stage { padding: 0 clamp(16px, 3vw, 32px); }

.sk-title {
  font-family: "Songti SC", "STSong", serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--navy);
  line-height: 1.3;
}

.sk-sub {
  font-size: 14.5px;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.75;
  max-width: 46em;
}

.sk-ctx {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(11, 44, 92, 0.05);
}

.sk-ctx b {
  font-size: 13.5px;
  color: var(--navy);
  padding: 4px 2px;
}

.sk-ctx span {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(47, 159, 214, 0.1);
  color: var(--navy);
}

.sk-ctx.empty {
  color: var(--muted);
  font-size: 13px;
}

.sk-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 0 0 22px;
}

.sk-stat {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(11, 44, 92, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.sk-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(11, 44, 92, 0.1);
}

.sk-stat .k {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.sk-stat .v {
  font-family: "Songti SC", serif;
  font-size: 28px;
  color: var(--navy);
  line-height: 1;
}

.sk-stat .u {
  margin-top: 6px;
  font-size: 12px;
  color: var(--sky);
}

.sk-journey {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sk-journey button {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sk-journey button:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 159, 214, 0.45);
  box-shadow: 0 12px 28px rgba(11, 44, 92, 0.1);
}

.sk-journey .idx {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), #164a8c);
  color: #fff;
  font-family: "Songti SC", serif;
  font-size: 15px;
}

.sk-journey strong { display: block; color: var(--navy); margin-bottom: 4px; }
.sk-journey small { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.sk-journey .go { color: var(--sky); font-size: 13px; font-weight: 600; }

.sk-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(11, 44, 92, 0.06);
}

.sk-panel h3 {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sky);
  font-weight: 700;
}

.sk-field { margin-bottom: 12px; }
.sk-field label {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

.sk-field input,
.sk-field textarea,
.sk-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sk-field input:focus,
.sk-field textarea:focus,
.sk-field select:focus {
  outline: none;
  border-color: rgba(47, 159, 214, 0.65);
  box-shadow: 0 0 0 3px rgba(47, 159, 214, 0.15);
}

.sk-field textarea { min-height: 88px; resize: vertical; }
.sk-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.sk-btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--navy), #163f7a);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.sk-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.sk-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.sk-btn.secondary,
.sk-btn.ghost {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
}

.sk-btn.warn {
  background: linear-gradient(135deg, #b71c1c, var(--crimson));
}

.sk-stream, .sk-log {
  margin-top: 10px;
  border-radius: 12px;
  padding: 12px;
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #f7fafc;
  border: 1px dashed rgba(11, 44, 92, 0.16);
  color: var(--muted);
  max-height: 220px;
  overflow: auto;
}

.sk-tip { color: var(--muted); font-size: 13.5px; }

.sk-questions-wrap { overflow: auto; }
.sk-questions {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.sk-questions th,
.sk-questions td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

.sk-questions th { color: var(--muted); font-weight: 600; font-size: 12px; }

.sk-roster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.sk-student {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.sk-student:hover,
.sk-student.active {
  transform: translateY(-2px);
  border-color: rgba(47, 159, 214, 0.5);
  box-shadow: 0 12px 28px rgba(11, 44, 92, 0.1);
}

.sk-student.active { outline: 2px solid rgba(47, 159, 214, 0.35); }

.sk-student .name {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.sk-student .meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.55;
}

.sk-student .score {
  margin-top: 10px;
  font-size: 12px;
  color: var(--sky);
  font-weight: 600;
}

.sk-boot-error {
  margin: 24px;
  padding: 16px;
  border: 1px solid #c45c5c;
  background: #fff5f5;
  color: #8a1f1f;
  border-radius: 12px;
  white-space: pre-wrap;
}

#sk-form-flash {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 clamp(16px, 3vw, 32px) 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(47, 159, 214, 0.16), rgba(11, 44, 92, 0.1));
  border: 1px solid rgba(47, 159, 214, 0.35);
  color: var(--navy);
  font-size: 13px;
  display: none;
}

#sk-form-flash.show { display: block; animation: sk-in 0.3s ease both; }

#sk-chat-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: inherit;
}

#sk-chat-dock .sk-fab {
  appearance: none;
  border: 0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), #163f7a 55%, var(--sky));
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(11, 44, 92, 0.28);
  animation: sk-pulse 2.4s ease infinite;
}

#sk-chat-dock.sk-open .sk-fab { display: none; }

#sk-chat-dock .sk-chat-panel {
  display: none;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, 72vh);
  background: #fff;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px rgba(11, 44, 92, 0.2);
  overflow: hidden;
  flex-direction: column;
}

#sk-chat-dock.sk-open .sk-chat-panel { display: flex; animation: sk-in 0.28s ease both; }

#sk-chat-dock .sk-chat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
  background: linear-gradient(135deg, var(--navy), #164a8c);
  color: #fff;
}

#sk-chat-dock .sk-chat-head strong { display: block; font-size: 15px; }
#sk-chat-dock .sk-chat-head small { opacity: 0.85; font-size: 12px; }

#sk-chat-dock .sk-chat-x {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
}

#sk-chat-dock .sk-chat-msgs {
  flex: 1;
  overflow: auto;
  padding: 14px;
  background: #f7fafc;
}

#sk-chat-dock .sk-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  margin-bottom: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

#sk-chat-dock .sk-bubble-bot {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}

#sk-chat-dock .sk-bubble-user {
  margin-left: auto;
  background: linear-gradient(135deg, var(--navy), #163f7a);
  color: #fff;
}

#sk-chat-dock .sk-bubble-loading { opacity: 0.7; }

#sk-chat-dock .sk-chat-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

#sk-chat-dock .sk-chat-tools button {
  appearance: none;
  border: 1px solid var(--line);
  background: #f4f8fc;
  color: var(--navy);
  border-radius: 999px;
  padding: 5px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

#sk-chat-dock .sk-chat-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

#sk-chat-dock .sk-chat-input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  resize: none;
  min-height: 42px;
}

#sk-chat-dock .sk-chat-send {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: linear-gradient(135deg, var(--navy), var(--sky));
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

#sk-chat-dock .sk-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 860px) {
  .sk-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 740px) {
  .sk-brand {
    grid-template-columns: 1fr;
    align-items: flex-start;
    padding: 18px 16px 10px;
  }
  .sk-brand-meta { text-align: left; }
  .sk-brand-logos img { width: 44px; height: 44px; }
  .sk-steps { margin: 0 12px 16px; padding: 0 4px; }
  .sk-stage { padding: 0 16px; }
  .sk-title { font-size: 22px; }
  .sk-row2 { grid-template-columns: 1fr; }
  .sk-journey button { grid-template-columns: 40px 1fr; }
  .sk-journey .go { display: none; }
  .sk-stats { grid-template-columns: 1fr 1fr; }
  #sk-chat-dock { right: 12px; bottom: 12px; }
  #sk-chat-dock .sk-chat-panel {
    width: calc(100vw - 24px);
    height: min(72vh, 540px);
  }
}
