:root {
  --canvas: oklch(96.5% 0.012 235);
  --surface: oklch(99.2% 0.004 235);
  --surface-raised: oklch(100% 0 0);
  --surface-muted: oklch(94.8% 0.014 235);
  --ink: oklch(21% 0.035 245);
  --text: oklch(30% 0.033 245);
  --muted: oklch(48% 0.03 245);
  --line: oklch(88% 0.018 235);
  --line-strong: oklch(78% 0.028 235);
  --primary: oklch(50% 0.105 205);
  --primary-dark: oklch(36% 0.09 210);
  --primary-soft: oklch(93% 0.032 205);
  --pending: oklch(46% 0.105 80);
  --pending-soft: oklch(94% 0.05 84);
  --success: oklch(45% 0.11 155);
  --success-soft: oklch(94% 0.045 155);
  --danger: oklch(48% 0.15 24);
  --danger-soft: oklch(94% 0.045 24);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgb(18 35 48 / 0.08);
  --shadow-panel: 0 12px 28px rgb(18 35 48 / 0.08);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

.project-room-layout {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.project-create-panel {
  position: sticky;
  top: 88px;
  align-self: start;
}

.field-label {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.competition-import-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.competition-import-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.competition-category-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.competition-category-filter legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.competition-category-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.competition-category-filter input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--primary);
}

.competition-search-panel {
  min-width: 0;
}

.competition-selected {
  min-height: 32px;
  margin: -2px 0 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.competition-result-list {
  max-height: 246px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 8px;
  padding-right: 4px;
}

.competition-result-item {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-content: stretch;
  align-items: start;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: white;
  color: var(--text);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}

.competition-result-item:hover,
.competition-result-item:focus-visible,
.competition-result-item[aria-selected="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(35 144 160 / 0.13);
  outline: none;
}

.competition-result-item:active {
  transform: translateY(1px);
}

.competition-result-item span,
.competition-result-item small {
  display: block;
}

.competition-result-item span {
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.competition-result-empty {
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

.project-room-grid,
.project-milestone-list,
.project-submission-list,
.project-request-list {
  display: grid;
  gap: 14px;
}

.project-card,
.project-milestone-card,
.project-submission-card,
.project-request-card,
.project-message,
.project-member-item {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, white);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.05);
}

.project-card h3,
.project-milestone-card h3,
.project-submission-card h3,
.project-request-card h3 {
  margin: 8px 0;
}

.project-card p,
.project-milestone-card p,
.project-submission-card p,
.project-request-card p,
.project-message p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.project-card-actions {
  margin-top: 16px;
}

.project-card-actions.single-action {
  display: flex;
  justify-content: flex-start;
}

.project-card-top,
.project-message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.project-side-panel {
  position: sticky;
  top: 88px;
}

.project-member-list {
  display: grid;
  gap: 10px;
}

.project-member-item {
  display: grid;
  gap: 6px;
}

.project-main-panel {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.project-chat-feed {
  max-height: 560px;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 4px;
}

.project-message.system,
.project-message.milestone,
.project-message.submission,
.project-message.request,
.project-message.score,
.project-message.return {
  background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface));
}

.project-message.return {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.project-chat-form,
.project-submission-card,
.project-request-card {
  display: grid;
  gap: 12px;
}

.mini-fold {
  margin-top: 14px;
}

.pledge-panel {
  max-width: 880px;
  margin-inline: auto;
}

.pledge-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  color: var(--text);
}

.danger-text {
  color: var(--danger);
  font-weight: 700;
}

.project-chat-workbench {
  grid-template-columns: minmax(280px, 0.24fr) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.project-chat-workbench.sidebar-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.project-chat-workbench.sidebar-collapsed .project-collab-sidebar {
  display: none;
}

.project-collab-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100dvh - 112px);
  overflow: auto;
  align-self: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-muted) 72%, white);
}

.project-sidebar-head,
.project-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-sidebar-head {
  margin-bottom: 12px;
}

.project-sidebar-head h2,
.project-chat-header h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.28;
}

.project-sidebar-head p,
.project-chat-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.project-tool-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  overflow: hidden;
}

.project-tool-section + .project-tool-section {
  margin-top: 10px;
}

.project-tool-section > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.project-tool-section > summary::-webkit-details-marker {
  display: none;
}

.project-tool-section > summary::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 900;
}

.project-tool-section[open] > summary {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--primary-soft) 34%, white);
}

.project-tool-section[open] > summary::after {
  content: "-";
}

.project-tool-section > summary small {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.project-tool-section > :not(summary) {
  margin: 12px;
}

.project-tool-section label,
.project-tool-section .check-row {
  margin-bottom: 10px;
}

.project-tool-section input,
.project-tool-section textarea,
.project-tool-section select {
  min-height: 38px;
  padding: 9px 10px;
  font-size: 13px;
}

.project-tool-section textarea {
  min-height: 84px;
}

.tag-list.compact {
  gap: 6px;
  margin-top: 4px;
}

.compact-list {
  gap: 10px;
}

.compact-list .project-milestone-card,
.compact-list .project-submission-card,
.compact-list .project-request-card,
.project-tool-section .project-member-item {
  padding: 12px;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.compact-list h3 {
  margin: 6px 0;
  font-size: 15px;
}

.compact-list p {
  font-size: 13px;
}

.project-log-list {
  display: grid;
  gap: 8px;
}

.project-log-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 92%, white);
}

.project-log-item strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-log-item a {
  font-size: 13px;
  font-weight: 800;
}

.project-conversation-panel {
  min-width: 0;
}

.project-chat-panel {
  min-height: calc(100dvh - 210px);
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 14px;
  margin-bottom: 0;
}

.project-dialog-feed {
  max-height: none;
  align-content: start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-muted) 72%, white), white);
}

.project-message.chat {
  width: min(72%, 680px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: none;
  white-space: normal;
}

.project-message.chat.mine {
  justify-self: end;
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 66%, white);
}

.project-message.chat.theirs {
  justify-self: start;
}

.project-message.chat .project-message-meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.project-message.chat .project-message-meta strong {
  color: var(--ink);
}

.project-message.chat p {
  margin: 0;
  color: var(--text);
}

.project-message.chat.deleted {
  max-width: 360px;
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-muted) 65%, white);
}

.project-reply-quote,
.project-reply-composer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--primary-soft) 58%, white);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-reply-quote {
  margin-bottom: 8px;
}

.project-message-deleted {
  color: var(--muted);
  font-style: italic;
}

.project-message-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.project-message-actions form {
  margin: 0;
}

.project-chat-empty {
  max-width: 460px;
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-align: center;
}

.project-chat-empty strong {
  color: var(--ink);
}

.project-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.project-composer label {
  margin-bottom: 0;
}

.project-reply-composer,
.project-mention-panel {
  grid-column: 1 / -1;
}

.project-reply-composer[hidden] {
  display: none;
}

.project-mention-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--surface) 86%, white);
}

.project-mention-panel summary {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.project-mention-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 10px 10px;
}

.project-mention-list label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.project-mention-list input {
  width: 14px;
  min-height: 14px;
  padding: 0;
  accent-color: var(--primary);
}

.project-composer textarea {
  min-height: 54px;
  max-height: 160px;
}

.project-file-trigger {
  min-height: 44px;
  margin-bottom: 0;
}

.project-file-trigger input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.project-dialog-feed {
  align-content: start;
  gap: 10px;
  padding: 18px;
  background: #f5f7f9;
}

.project-message.chat {
  width: min(68%, 640px);
  display: flex;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.project-message.chat.mine {
  justify-self: end;
  flex-direction: row-reverse;
  border: 0;
  background: transparent;
}

.project-message.chat.theirs {
  justify-self: start;
}

.project-message-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary-soft) 72%, white);
  color: var(--primary-dark);
  font-weight: 900;
}

.project-message.mine .project-message-avatar {
  display: none;
}

.project-message-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.project-message.mine .project-message-body {
  justify-items: end;
}

.project-bubble {
  position: relative;
  min-width: 0;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: white;
  color: var(--text);
  overflow-wrap: anywhere;
  box-shadow: 0 1px 2px rgb(18 35 48 / 0.05);
}

.project-message.mine .project-bubble {
  background: color-mix(in srgb, var(--primary-soft) 72%, white);
}

.project-message.chat .project-message-meta {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.project-message.mine .project-message-meta {
  justify-content: flex-end;
}

.project-mention-mark {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--pending-soft);
  color: var(--pending);
  font-size: 12px;
  font-weight: 900;
}

.project-message-more {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 26px;
  width: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  opacity: 0;
}

.project-message.mine .project-message-more {
  right: auto;
  left: 4px;
}

.project-message.chat:hover .project-message-more,
.project-message.chat:focus-within .project-message-more {
  opacity: 1;
}

.project-message-more:hover,
.project-message-more:focus-visible {
  background: rgb(15 23 42 / 0.07);
  color: var(--ink);
  border: 0;
}

.project-system-line {
  justify-self: center;
  max-width: min(80%, 520px);
  padding: 3px 10px;
  border-radius: 999px;
  background: transparent;
  color: oklch(58% 0.018 245);
  font-size: 13px;
  text-align: center;
}

.project-attachment-card {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.72);
}

.project-attachment-card strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.project-attachment-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.project-attachment-card a {
  font-size: 13px;
  font-weight: 900;
}

.project-context-menu {
  position: fixed;
  z-index: 50;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: var(--shadow-panel);
}

.project-context-menu button {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 7px 9px;
  white-space: normal;
}

.project-context-menu button:hover,
.project-context-menu button:focus-visible {
  background: var(--surface-muted);
  border: 0;
}

.project-preview-dialog {
  width: min(92vw, 980px);
  height: min(86dvh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-panel);
}

.project-preview-dialog::backdrop {
  background: rgb(15 23 42 / 0.38);
}

.project-preview-head,
.project-preview-foot {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.project-preview-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.project-preview-body {
  height: calc(100% - 104px);
  display: grid;
  place-items: center;
  background: var(--surface-muted);
}

.project-preview-body iframe,
.project-preview-body video,
.project-preview-body img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: white;
}

.open-chat-shell {
  height: min(76dvh, 820px);
  min-height: 620px;
}

.open-chat-container {
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.open-chat-members {
  background: var(--surface-raised);
}

.open-chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.open-chat-list .cs-message-list__scroll-wrapper {
  overflow-y: auto;
  padding: 16px 18px;
  background: #f5f7f9;
}

.open-chat-list .cs-message__content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.open-chat-reply {
  margin-bottom: 7px;
  padding: 7px 8px;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.5);
  font-size: 13px;
  font-weight: 700;
}

.open-chat-attachment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgb(0 0 0 / 0.08);
}

.open-chat-attachment strong {
  flex-basis: 100%;
  overflow-wrap: anywhere;
}

.open-chat-input {
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  align-items: end;
}

.open-chat-textarea {
  min-height: 44px;
  max-height: 120px;
  border: 0;
  background: transparent;
  resize: vertical;
  box-shadow: none;
}

.open-chat-textarea:focus {
  box-shadow: none;
}

.open-chat-attach {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.open-chat-attach input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.open-chat-send {
  min-height: 44px;
  color: var(--primary-dark);
  font-weight: 900;
}

.project-reply-composer {
  align-items: center;
  min-height: 38px;
}

.project-composer {
  position: sticky;
  bottom: 0;
  z-index: 12;
  background: var(--surface-raised);
}

@media (max-width: 960px) {
  .project-room-layout,
  .project-workbench {
    grid-template-columns: 1fr;
  }

  .project-create-panel,
  .project-side-panel {
    position: static;
  }

  .project-chat-feed {
    max-height: none;
  }

  .project-chat-workbench {
    grid-template-columns: 1fr;
  }

  .project-collab-sidebar {
    position: static;
    max-height: none;
    order: 2;
  }

  .project-conversation-panel {
    order: 1;
  }

  .project-chat-panel {
    min-height: 620px;
  }

  .project-message.chat {
    width: min(88%, 680px);
  }

  .project-composer {
    grid-template-columns: 1fr;
  }

  .open-chat-shell {
    height: 78dvh;
    min-height: 560px;
  }

  .open-chat-container {
    flex-direction: column;
  }

  .open-chat-members {
    display: none;
  }

  .competition-import-grid {
    grid-template-columns: 1fr;
  }

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

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(145deg, rgb(232 241 246 / 0.86), transparent 360px),
    var(--canvas);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

img,
video,
canvas,
svg {
  max-width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

.skip-nav {
  position: fixed;
  left: 16px;
  top: -56px;
  z-index: 40;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--primary-dark);
  box-shadow: var(--shadow-panel);
}

.skip-nav:focus {
  top: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.94), rgb(246 250 252 / 0.94));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  min-width: 0;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background:
    linear-gradient(135deg, var(--primary), oklch(63% 0.11 205));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.42);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: 5px;
}

.brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.2;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-family: "Cascadia Mono", Consolas, monospace;
}

.nav {
  display: grid;
  gap: 8px;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.4s ease 1.5s;
}

.nav:hover,
.nav:active,
.nav:focus-within {
  scrollbar-color: rgba(15, 143, 146, 0.25) transparent;
  transition: scrollbar-color 0.2s ease 0s;
}

.nav::-webkit-scrollbar {
  width: 5px;
}

.nav::-webkit-scrollbar-track {
  background: transparent;
}

.nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  transition: background 0.4s ease 1.5s;
}

.nav:hover::-webkit-scrollbar-thumb,
.nav:active::-webkit-scrollbar-thumb,
.nav:focus-within::-webkit-scrollbar-thumb {
  background: rgba(15, 143, 146, 0.25);
  transition: background 0.2s ease 0s;
}

.nav::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 143, 146, 0.45);
}

.nav a,
.nav summary,
.public-nav a {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: oklch(34% 0.032 245);
  font-size: 15px;
  font-weight: 700;
  transition: background-color 170ms var(--ease), color 170ms var(--ease), transform 170ms var(--ease);
}

.nav a:hover,
.nav a:focus-visible,
.nav summary:hover,
.nav summary:focus-visible,
.public-nav a:hover,
.public-nav a:focus-visible {
  background: #E8F5F5;
  color: #0F8F92;
}

.nav-sub a.active {
  background: #E8F5F5;
  color: #0F8F92;
  border-left: 3px solid #0F8F92;
  padding-left: 9px;
  font-weight: 900;
}

.nav a:active,
.nav summary:active,
.button:active,
button:active {
  transform: translateY(1px);
}

.nav-primary {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group summary {
  min-height: 42px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
  justify-content: space-between;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "+";
  color: var(--primary);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
}

.nav-group[open] summary::after {
  content: "-";
}

.nav-sub {
  display: grid;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.nav-sub a {
  min-height: 38px;
  padding: 8px 12px;
  color: oklch(31% 0.032 245);
  font-size: 14px;
  font-weight: 800;
}

.account-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.account-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.account-card strong {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}

.account-card a {
  font-size: 13px;
  font-weight: 700;
}

.workspace {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  min-width: 0;
  box-sizing: border-box;
}

.public-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  background: rgb(7 14 23 / 0.72);
  backdrop-filter: blur(18px);
}

.public-header .brand,
.public-header .brand:hover {
  color: oklch(97% 0.012 210);
}

.public-header .brand small {
  color: oklch(76% 0.035 215);
}

.public-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.public-nav a {
  color: oklch(89% 0.025 215);
  font-size: 14px;
}

.public-nav a:hover,
.public-nav a:focus-visible {
  background: rgb(255 255 255 / 0.08);
  color: white;
}

.public-page {
  min-height: calc(100vh - 72px);
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

body:has(.login-stage) {
  background:
    radial-gradient(ellipse at 18% 24%, rgb(25 117 133 / 0.34), transparent 32%),
    radial-gradient(ellipse at 86% 68%, rgb(70 91 128 / 0.22), transparent 34%),
    linear-gradient(135deg, #07101a, #0a1723 48%, #08111d);
  color: oklch(94% 0.018 215);
}

body:has(.intro-page) {
  background:
    radial-gradient(circle at 12% 18%, rgb(45 225 194 / 0.2), transparent 32%),
    radial-gradient(circle at 88% 16%, rgb(99 139 255 / 0.16), transparent 28%),
    linear-gradient(135deg, #050914, #071526 48%, #040914);
  color: oklch(94% 0.018 215);
}

body:has(.honor-page) {
  background:
    radial-gradient(circle at 18% 20%, rgb(45 225 194 / 0.18), transparent 32%),
    radial-gradient(circle at 78% 8%, rgb(255 196 87 / 0.14), transparent 28%),
    linear-gradient(135deg, #050914, #071526 48%, #040914);
  color: oklch(94% 0.018 215);
}

body:has(.intro-page) .public-page,
body:has(.intro-page) .workspace,
body:has(.honor-page) .workspace,
body:has(.intro-page) .activity-center-page,
body:has(.honor-page) .activity-center-page {
  width: 100%;
  padding: 0;
}

body:has(.intro-page) .activity-center-page > .activity-topbar,
body:has(.honor-page) .activity-center-page > .activity-topbar {
  width: min(1240px, calc(100% - 32px));
  margin: 16px auto 0;
}

.intro-page {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 72px);
}

.intro-page::before {
  content: "";
  position: fixed;
  inset: 72px 0 0;
  pointer-events: none;
  background:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

.intro-canvas {
  position: fixed;
  inset: 72px 0 0;
  width: 100%;
  height: calc(100vh - 72px);
  pointer-events: none;
  opacity: 0.52;
}

.intro-hero,
.intro-section {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.intro-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.76fr);
  align-items: center;
  gap: 56px;
  padding: 64px 0 84px;
}

.intro-chip,
.intro-section-head span,
.intro-feature span,
.intro-api-panel span {
  display: inline-flex;
  color: oklch(85% 0.11 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.intro-hero h1 {
  max-width: 850px;
  margin: 16px 0 20px;
  color: white;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro-hero p {
  max-width: 650px;
  margin: 0;
  color: oklch(77% 0.038 220);
  font-size: 18px;
}

.intro-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.intro-actions .button.ghost {
  border-color: rgb(130 244 255 / 0.28);
  background: rgb(255 255 255 / 0.055);
  color: oklch(92% 0.02 215);
}

.intro-orbit {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
}

.orbit-ring {
  position: absolute;
  width: min(440px, 82vw);
  aspect-ratio: 1;
  border: 1px solid rgb(130 244 255 / 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgb(130 244 255 / 0.14), transparent 60%),
    conic-gradient(from 120deg, transparent, rgb(130 244 255 / 0.42), transparent 36%, rgb(96 115 255 / 0.36), transparent 72%);
  box-shadow: 0 0 80px rgb(45 225 194 / 0.16);
  animation: orbit-spin 18s linear infinite;
}

.orbit-core,
.orbit-node {
  position: absolute;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgb(130 244 255 / 0.24);
  background: rgb(6 18 32 / 0.68);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.28);
}

.orbit-core {
  width: 164px;
  height: 164px;
  border-radius: 50%;
}

.orbit-core strong {
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 30px;
}

.orbit-core span,
.orbit-node span {
  color: oklch(76% 0.04 220);
  font-size: 12px;
  font-weight: 800;
}

.orbit-node {
  width: 118px;
  min-height: 76px;
  border-radius: 8px;
  padding: 10px;
}

.orbit-node strong {
  color: oklch(88% 0.1 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 24px;
}

.node-1 { transform: translate(-156px, -178px); }
.node-2 { transform: translate(170px, -126px); }
.node-3 { transform: translate(164px, 160px); }
.node-4 { transform: translate(-184px, 122px); }

.intro-section {
  padding: 92px 0;
}

.intro-section-head {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
}

.intro-section-head h2,
.intro-api-panel h2 {
  max-width: 760px;
  margin: 0;
  color: white;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

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

.intro-feature,
.intro-step,
.intro-api-panel {
  border: 1px solid rgb(130 244 255 / 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035)),
    rgb(6 18 32 / 0.62);
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.24);
  backdrop-filter: blur(16px);
}

.intro-feature {
  min-height: 250px;
  padding: 24px;
}

.intro-feature h3,
.intro-step h3 {
  margin: 18px 0 10px;
  color: white;
  font-size: 24px;
}

.intro-feature p,
.intro-step p,
.intro-api-panel p {
  margin: 0;
  color: oklch(76% 0.038 220);
}

.intro-proof-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.intro-proof {
  min-height: 220px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgb(130 244 255 / 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at top left, rgb(130 244 255 / 0.16), transparent 42%),
    rgb(6 18 32 / 0.68);
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.22);
}

.intro-proof > strong {
  color: oklch(90% 0.12 190);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 36px;
  line-height: 1;
}

.intro-proof h3,
.intro-course-band h3 {
  margin: 0;
  color: white;
}

.intro-proof p {
  margin: 0;
  color: oklch(78% 0.038 220);
}

.intro-course-band {
  display: grid;
  grid-template-columns: minmax(220px, 0.38fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
  padding: 24px;
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.055);
}

.intro-course-band span {
  color: oklch(85% 0.11 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.intro-course-band ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intro-course-band li {
  padding: 9px 12px;
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 999px;
  color: oklch(90% 0.03 220);
  background: rgb(255 255 255 / 0.055);
  font-weight: 800;
}

.intro-honor-showcase {
  padding-top: 40px;
}

.intro-honor-orbit {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgb(130 244 255 / 0.14);
  border-radius: 10px;
  background:
    radial-gradient(circle at center, rgb(130 244 255 / 0.12), transparent 42%),
    rgb(6 18 32 / 0.42);
}

.intro-honor-orbit::before {
  content: "";
  position: absolute;
  width: min(560px, 72vw);
  aspect-ratio: 1;
  border: 1px solid rgb(130 244 255 / 0.18);
  border-radius: 50%;
  animation: orbit-spin 24s linear infinite;
}

.intro-honor-core {
  position: relative;
  z-index: 3;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgb(130 244 255 / 0.24);
  border-radius: 50%;
  background: rgb(6 18 32 / 0.78);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.28);
}

.intro-honor-core strong {
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 42px;
}

.intro-honor-core span {
  color: oklch(78% 0.04 220);
  font-weight: 900;
}

.intro-honor-card {
  position: absolute;
  z-index: 2;
  --x: 0px;
  --y: 0px;
  --r: 0deg;
  width: 238px;
  display: grid;
  grid-template-rows: 118px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035)),
    rgb(6 18 32 / 0.76);
  box-shadow: 0 20px 44px rgb(0 0 0 / 0.24);
  transform: translate(var(--x), var(--y)) rotate(var(--r));
  animation: intro-honor-float 7s ease-in-out infinite;
}

.intro-honor-preview {
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgb(130 244 255 / 0.14);
  border-radius: 7px;
  background: rgb(255 255 255 / 0.08);
}

.intro-honor-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: white;
}

.intro-honor-preview span,
.intro-honor-card span {
  color: oklch(86% 0.1 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.intro-honor-card strong {
  display: block;
  margin: 6px 0 4px;
  color: white;
  line-height: 1.25;
}

.intro-honor-card small {
  color: oklch(76% 0.038 220);
}

.intro-honor-card-1 { --x: -390px; --y: -155px; --r: -8deg; animation-delay: -0.5s; }
.intro-honor-card-2 { --x: -105px; --y: -210px; --r: 5deg; animation-delay: -1.3s; }
.intro-honor-card-3 { --x: 225px; --y: -145px; --r: 8deg; animation-delay: -2.1s; }
.intro-honor-card-4 { --x: 350px; --y: 96px; --r: -4deg; animation-delay: -2.9s; }
.intro-honor-card-5 { --x: 78px; --y: 205px; --r: 6deg; animation-delay: -3.7s; }
.intro-honor-card-6 { --x: -268px; --y: 152px; --r: -6deg; animation-delay: -4.5s; }
.intro-honor-card-7 { --x: -445px; --y: 42px; --r: 7deg; animation-delay: -5.3s; }
.intro-honor-card-8 { --x: 430px; --y: -28px; --r: -7deg; animation-delay: -6.1s; }

.intro-honor-actions {
  justify-content: center;
  margin-top: 18px;
}

@keyframes intro-honor-float {
  0%, 100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0.92; }
  50% { transform: translate(var(--x), calc(var(--y) - 14px)) rotate(var(--r)) scale(1.02); opacity: 1; }
}

.intro-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.intro-step {
  min-height: 220px;
  padding: 22px;
  position: relative;
}

.intro-step > span {
  color: oklch(86% 0.1 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 36px;
  font-weight: 900;
}

.intro-api-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.6fr);
  gap: 28px;
  padding: 30px;
  margin-bottom: 84px;
}

.intro-api-panel dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.intro-api-panel dl div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid rgb(130 244 255 / 0.14);
  border-radius: 7px;
  background: rgb(255 255 255 / 0.04);
}

.intro-api-panel dt {
  color: oklch(76% 0.04 220);
  font-weight: 900;
}

.intro-api-panel dd {
  margin: 0;
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  overflow-wrap: anywhere;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-stage {
  min-height: calc(100vh - 154px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 44px;
}

.login-stage.compact {
  grid-template-columns: minmax(320px, 460px);
  justify-content: center;
}

.login-copy {
  max-width: 690px;
}

.system-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0F8F92;
  background: #E8F5F5;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
}

.login-copy h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: 0;
  text-wrap: balance;
}

.login-copy p {
  max-width: 60ch;
  color: oklch(78% 0.035 220);
  font-size: 17px;
}

.role-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.role-strip div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid rgb(137 226 236 / 0.18);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.045);
}

.role-strip span {
  display: block;
  color: oklch(86% 0.08 205);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 18px;
  font-weight: 900;
}

.role-strip strong {
  display: block;
  margin-top: 5px;
  color: oklch(90% 0.018 215);
  font-size: 13px;
}

.auth-panel {
  width: 100%;
  padding: 28px;
  border: 1px solid rgb(137 226 236 / 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.10), rgb(255 255 255 / 0.045)),
    rgb(7 14 23 / 0.64);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.28);
  color: oklch(94% 0.018 215);
  backdrop-filter: blur(18px);
}

.form-title {
  margin-bottom: 18px;
}

.form-title span {
  color: oklch(82% 0.07 205);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.form-title h1,
.form-title h2 {
  margin: 4px 0 0;
  color: white;
  font-size: 28px;
  line-height: 1.2;
}

.panel,
.hero-band,
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.panel {
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}

.hero-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 22px 28px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.98), rgb(242 249 251 / 0.98));
}

.hero-band h1,
.panel h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
}

.panel h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.3;
}

.hero-band p,
.section-head p {
  margin: 0;
  max-width: 68ch;
  color: var(--muted);
}

.member-archive-hero {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 280px) auto;
  gap: 22px;
  align-items: center;
  padding: 26px 28px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.98), rgb(240 249 251 / 0.98)),
    var(--surface-raised);
  box-shadow: var(--shadow);
}

.member-archive-brand {
  position: absolute;
  right: -42px;
  bottom: -44px;
  z-index: 0;
  display: flex;
  align-items: baseline;
  gap: 18px;
  max-width: 88%;
  color: oklch(70% 0.05 210 / 0.18);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.member-archive-brand strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: clamp(70px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: 0;
}

.member-archive-brand span {
  font-size: clamp(30px, 5vw, 74px);
  font-weight: 900;
  letter-spacing: 0;
}

.archive-identity,
.archive-quick-facts,
.archive-back {
  position: relative;
  z-index: 1;
}

.archive-identity {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-width: 0;
}

.member-avatar {
  width: 128px;
  aspect-ratio: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid oklch(82% 0.038 210);
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, oklch(94% 0.045 200), transparent 58%),
    var(--primary-soft);
  color: var(--primary-dark);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.7);
}

.member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar span {
  font-size: 54px;
  font-weight: 900;
}

.archive-title-block {
  min-width: 0;
}

.archive-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.member-archive-hero h1 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: 0;
  text-wrap: balance;
}

.member-archive-hero p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.avatar-upload-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.avatar-upload-form small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
}

.avatar-file-control {
  position: relative;
  overflow: hidden;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.avatar-file-control:hover,
.avatar-file-control:focus-within {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.avatar-file-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

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

.archive-quick-facts div,
.archive-summary-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.72);
}

.archive-quick-facts div {
  min-height: 78px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 10px;
}

.archive-quick-facts span,
.archive-summary-grid span,
.archive-info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.archive-quick-facts strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 28px;
}

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

.archive-summary-grid article {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 16px;
}

.archive-summary-grid strong {
  min-width: 0;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.archive-summary-grid small {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.member-archive-layout {
  grid-template-columns: minmax(320px, 0.38fr) minmax(0, 1fr);
}

.archive-info-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
}

.archive-info-list div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
}

.archive-info-list dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.archive-record-panel {
  min-height: 270px;
}

.archive-empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(232 245 245 / 0.7), rgb(255 255 255 / 0.82));
  text-align: center;
}

.archive-empty-state strong,
.archive-locked-panel h2 {
  color: var(--ink);
}

.archive-empty-state span,
.archive-locked-panel p {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
}

.archive-locked-panel {
  background:
    linear-gradient(135deg, var(--surface-raised), var(--primary-soft));
}

/* ==========================================
   Home Dashboard
   ========================================== */
.home-dash {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.home-left-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

/* ---- welcome card ---- */
.home-welcome {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-height: 150px;
  padding: 28px 44px;
  border: 1px solid #DDE5EC;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(255 255 255 / 0.98), rgb(238 247 248 / 0.96));
  box-shadow: 0 2px 8px rgba(15,35,50,0.04);
  position: relative;
  overflow: hidden;
}

.home-welcome::before {
  content: "901";
  position: absolute;
  right: -90px;
  bottom: -140px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 400px;
  font-weight: 900;
  color: rgba(15, 143, 146, 0.035);
  line-height: 1;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.home-welcome::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -100px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 50%, rgba(15,143,146,0.06) 0%, rgba(15,143,146,0.02) 40%, transparent 70%);
  pointer-events: none;
}

.home-welcome .home-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: #0F8F92;
  background: #E8F5F5;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  width: fit-content;
}

.home-welcome h1 {
  margin: 0;
  color: var(--ink);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  letter-spacing: -0.01em;
}

.home-identity-tag {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #0F8F92;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  flex: 0 0 auto;
}

.home-welcome p {
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.5;
  max-width: 64ch;
}

/* ---- stats strip ---- */
.home-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.home-stat-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 56px;
  padding: 0 14px;
  border: 1px solid #DDE5EC;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(15,35,50,0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  min-width: 0;
}

.home-stat-pill:hover {
  border-color: #0F8F92;
  box-shadow: 0 2px 10px rgba(15,143,146,0.08);
}

.home-stat-pill span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-stat-pill strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  color: var(--ink);
  flex: 0 0 auto;
}

.home-stat-pill.is-zero {
  background: #F7F9FB;
  opacity: 0.7;
}

.home-stat-pill.is-zero strong {
  color: var(--muted);
}

/* ---- timetable card ---- */
.home-timetable-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid #DDE5EC;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,35,50,0.04);
  min-width: 0;
  overflow: hidden;
}

.home-timetable-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.home-timetable-head span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.home-timetable-head strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.home-timetable-head a {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.home-week-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
}

.home-week-form label {
  display: grid;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.home-week-form input {
  min-height: 30px;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.home-day-schedule {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.home-day-schedule article {
  display: grid;
  gap: 1px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #F7F9FB;
}

.home-day-schedule article.has-course {
  border-color: rgba(15,143,146,0.25);
  background: #E8F5F5;
}

.home-day-schedule span {
  color: #0F8F92;
  font-size: 10px;
  font-weight: 700;
}

.home-day-schedule strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
}

.home-day-schedule small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.2;
}

.home-timetable-empty {
  display: grid;
  align-content: center;
  gap: 6px;
  flex: 1 1 auto;
}

.home-timetable-empty strong {
  color: var(--ink);
  font-size: 14px;
}

.home-timetable-empty p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---- side stack (time + weather) ---- */
.home-side-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-time-card,
.home-weather-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px;
  border: 1px solid #DDE5EC;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,35,50,0.04);
}

.home-time-card span,
.home-weather-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.home-time-card strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 30px;
  line-height: 1;
}

.home-weather-card strong {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.home-time-card small,
.home-weather-card small,
.home-weather-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.home-weather-card em {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.home-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

@media (max-width: 900px) {
  .home-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* old pending-strip removed — now .home-stats-strip handles the stats row */

/* ---- Quick Access Bento Grid ---- */
.quick-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.quick-manage-details {
  flex: 0 0 auto;
}

.quick-manage-btn {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #0F8F92;
  border-radius: 6px;
  color: #0F8F92;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  white-space: nowrap;
  transition: background 140ms ease, color 140ms ease;
}

.quick-manage-btn:hover {
  background: #E8F5F5;
}

.quick-manage-btn::-webkit-details-marker {
  display: none;
}

.quick-manage-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #DDE5EC;
}

.quick-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quick-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid #DDE5EC;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.quick-option:has(input:checked) {
  border-color: #0F8F92;
  background: #E8F5F5;
}

.quick-option input {
  margin-top: 2px;
  accent-color: #0F8F92;
}

.quick-option span {
  display: grid;
  gap: 3px;
}

.quick-option strong {
  color: var(--ink);
  font-size: 13px;
}

.quick-option small {
  color: var(--muted);
  font-size: 12px;
}

/* ---- Bento Grid ---- */
.quick-bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.quick-bento-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid #DDE5EC;
  border-radius: 12px;
  background: linear-gradient(135deg, rgb(255 255 255), rgb(246 250 251));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(15,35,50,0.03);
  position: relative;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  min-width: 0;
}

.quick-bento-card:hover,
.quick-bento-card:focus-visible {
  border-color: #0F8F92;
  box-shadow: 0 4px 16px rgba(15,143,146,0.08);
  transform: translateY(-2px);
}

.quick-bento-lg {
  grid-column: span 2;
  min-height: 118px;
}

.quick-bento-sm {
  grid-column: span 1;
  min-height: 88px;
}

.quick-icon {
  font-size: 22px;
  line-height: 1;
  opacity: 0.7;
}

.quick-bento-lg .quick-icon {
  font-size: 26px;
}

.quick-bento-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.quick-bento-lg strong {
  font-size: 20px;
}

.quick-bento-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.quick-bento-lg span {
  font-size: 13px;
}

.quick-arrow {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 14px;
  color: #CDD4DC;
  font-style: normal;
  transition: color 160ms ease, transform 160ms ease;
}

.quick-bento-card:hover .quick-arrow {
  color: #0F8F92;
  transform: translateX(3px);
}

.quick-bento-empty {
  border-style: dashed;
  border-color: #CDD4DC;
  background: #F7F9FB;
  box-shadow: none;
}

.quick-bento-empty strong {
  color: var(--muted);
  font-size: 15px;
}

.quick-bento-empty span {
  font-size: 12px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.training-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  box-shadow: var(--shadow);
}

.metric-card span,
.data-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.metric-card strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 30px;
  line-height: 1;
}

.metric-card small {
  align-self: end;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: min(420px, 100%);
}

.filter-bar label {
  flex: 1;
  min-width: 220px;
  margin: 0;
}

.progress-cell {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.progress-cell > span {
  color: var(--ink);
  font-weight: 900;
}

.data-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.data-strip div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.data-strip strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 20px;
}

.training-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.compact-table table {
  min-width: 640px;
}

.compare-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* old quick-grid / quick-card removed — now .quick-bento handles quick-access layout */

.stat {
  padding: 18px;
}

.stat span {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 32px;
  line-height: 1;
}

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

.muted,
small {
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.auth-panel label {
  color: oklch(91% 0.02 215);
}

input,
textarea,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: white;
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms var(--ease);
}

.auth-panel input {
  border-color: rgb(137 226 236 / 0.28);
  background: rgb(255 255 255 / 0.075);
  color: white;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(35 144 160 / 0.16);
}

.auth-panel input:focus {
  border-color: oklch(82% 0.07 205);
  box-shadow: 0 0 0 3px rgb(137 226 236 / 0.16);
}

input:disabled {
  background: var(--surface-muted);
  color: var(--muted);
}

textarea {
  resize: vertical;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) right 16px center / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) right 11px center / 7px 7px no-repeat,
    white;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
  flex: 0 0 auto;
}

.button,
button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}

.button:hover,
button:hover,
.button:focus-visible,
button:focus-visible {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.button.primary,
button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.button.primary:hover,
button.primary:hover,
.button.primary:focus-visible,
button.primary:focus-visible {
  background: var(--primary-dark);
  color: white;
}

.button.ghost {
  background: var(--surface);
}

.button.small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.button.danger {
  color: var(--danger);
  border-color: oklch(80% 0.07 24);
  background: var(--danger-soft);
}

.form-panel {
  max-width: 960px;
}

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

.wide,
.actions {
  grid-column: 1 / -1;
}

.actions {
  padding-top: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.actions .button.primary {
  width: auto;
  min-width: 120px;
}

.field-block {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.field-block > strong {
  color: var(--ink);
  font-size: 14px;
}

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

.checkbox-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.checkbox-grid .check-row {
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.checkbox-grid small {
  display: block;
}

.compact-head {
  margin-bottom: 12px;
}

.tag-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================
   Unified Table System — sticky header + sticky right col
   ========================================== */
.table-shell {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid #DDE5EC;
  border-radius: 10px;
  background: #fff;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-scroll::-webkit-scrollbar {
  height: 5px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(15,143,146,0.2);
  border-radius: 999px;
}

.tbl-sticky {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.tbl-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F4F7FA;
  font-weight: 700;
  font-size: 12px;
  color: #667085;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 2px solid #DDE5EC;
  white-space: nowrap;
}

.tbl-sticky tbody td {
  border-bottom: 1px solid #EDF1F5;
  vertical-align: middle;
}

.tbl-sticky tbody tr:hover {
  background: #F9FBFC;
}

.tbl-sticky tbody tr:last-child td {
  border-bottom: 0;
}

/* sticky right column */
.tbl-sticky .col-app-actions {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  white-space: nowrap;
  box-shadow: -4px 0 8px rgba(15,35,50,0.04);
}

.tbl-sticky tbody tr:hover .col-app-actions {
  background: #F9FBFC;
}

/* col widths */
.col-app-user { min-width: 100px; }
.col-app-info { min-width: 120px; }
.col-app-contact { min-width: 110px; }
.col-app-reason { min-width: 140px; max-width: 200px; }
.col-app-status { min-width: 60px; white-space: nowrap; }
.col-app-file { min-width: 90px; max-width: 140px; }
.col-app-file a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 130px;
}

.col-app-time {
  min-width: 80px;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.col-mem-act {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  white-space: nowrap;
  box-shadow: -4px 0 8px rgba(15,35,50,0.04);
}

.tbl-sticky tbody tr:hover .col-mem-act {
  background: #F9FBFC;
}

.col-ellipsis {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.member-search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-input {
  height: 36px;
  width: 220px;
  padding: 0 10px;
  border: 1px solid #DDE5EC;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 140ms ease;
}

.search-input:focus {
  outline: none;
  border-color: #0F8F92;
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}

.col-mem-comm { white-space: nowrap; }
.comm-panel { display:grid; gap:8px; }
.comm-options { display:flex; gap:10px; flex-wrap:wrap; }
.comm-option { flex:1; min-width:180px; border:1px solid #DDE5EC; border-radius:8px; padding:8px 12px; background:#fff; }
.comm-option summary { cursor:pointer; font-weight:600; font-size:13px; list-style:none; }
.comm-option summary::-webkit-details-marker { display:none; }
.comm-option[open] { border-color:#0F8F92; }
.comm-form { display:grid; gap:6px; }
.comm-form label { font-size:12px; color:#667085; margin:0; }

.msg-inbox { display:grid; gap:8px; }
.msg-card { padding:12px 16px; border:1px solid #DDE5EC; border-radius:8px; background:#fff; }
.msg-card.unread { border-left:3px solid #0F8F92; background:#F7F9FB; }
.msg-card strong { font-size:14px; color:var(--ink); }
.msg-card small { display:block; color:var(--muted); margin-top:4px; }
.msg-card p { margin:8px 0 0; color:var(--text); }

.msg-badge { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:#D94C4C; color:#fff; font-size:11px; font-weight:700; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state strong {
  display: block;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--muted);
  font-size: 14px;
  max-width: 480px;
  margin: 0 auto;
}

/* scoring sticky bar */
.scoring-sticky-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 10px 16px;
  margin: 12px -24px -24px;
  background: #fff;
  border-top: 1px solid #DDE5EC;
  border-radius: 0 0 10px 10px;
}

.unsaved-hint {
  color: #D94C4C;
  font-size: 13px;
  font-weight: 600;
}

.saved-hint {
  color: #0F8F92;
  font-size: 13px;
  font-weight: 600;
}

.score-input {
  width: 70px;
}

/* resource tabs */
.resource-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #DDE5EC;
  margin-bottom: 20px;
}

.resource-tab {
  flex: 0 0 auto;
}

.resource-tab input {
  display: none;
}

.resource-tab span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 140ms ease, border-color 140ms ease;
}

.resource-tab input:checked + span {
  color: #0F8F92;
  border-bottom-color: #0F8F92;
}

.resource-tab-panels {
  display: grid;
}

.resource-tab-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.resource-tab-panel:not(:first-child) {
  display: none;
}

.resource-tabs:has(.resource-tab:last-child input:checked) ~ .resource-tab-panels .resource-tab-panel:first-child {
  display: none;
}

.resource-tabs:has(.resource-tab:last-child input:checked) ~ .resource-tab-panels .resource-tab-panel:last-child {
  display: grid;
}

.resource-tab-panel label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.resource-tab-panel .button {
  grid-column: 1 / -1;
  justify-self: start;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

th {
  background: var(--surface-muted);
  color: oklch(38% 0.028 245);
  font-size: 13px;
  font-weight: 900;
}

tbody tr:hover {
  background: oklch(98% 0.008 225);
}

.score-input {
  max-width: 120px;
}

.reason-cell {
  max-width: 320px;
}

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

.inline-form {
  display: inline-flex;
  margin: 0;
}

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

.delete-confirm-panel {
  width: min(260px, 100%);
  margin-top: 8px;
  padding: 10px;
  border: 1px solid oklch(82% 0.055 24);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
}

.delete-confirm-panel form {
  display: grid;
  gap: 8px;
}

.delete-confirm-panel label {
  display: grid;
  gap: 5px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.delete-confirm-panel .inline-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid oklch(78% 0.07 24);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.delete-confirm-panel .inline-input:focus {
  outline: none;
  border-color: var(--danger);
  box-shadow: 0 0 0 3px oklch(88% 0.05 24 / 0.45);
}

.row-delete-form {
  justify-content: flex-end;
  margin-top: -6px;
}

.badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.badge-wait {
  color: var(--pending);
  background: var(--pending-soft);
}

.badge-ok {
  color: var(--success);
  background: var(--success-soft);
}

.badge-no {
  color: var(--danger);
  background: var(--danger-soft);
}

.badge-grade,
.badge-plain {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.badge-plain {
  color: var(--muted);
  background: var(--surface-muted);
}

.desktop-table {
  display: block;
}

.mobile-cards {
  display: none;
}

.grade-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 18px;
}

.grade-filter a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.grade-filter a.active,
.grade-filter a:hover,
.grade-filter a:focus-visible {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.grade-filter strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  color: inherit;
}

.member-card-list {
  gap: 12px;
}

.member-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.member-card h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
}

.member-card p {
  margin: 0;
  color: var(--muted);
}

.member-card-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.member-card-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
}

.member-card-meta dt {
  color: var(--muted);
  font-weight: 900;
}

.member-card-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.grade-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.grade-group-card,
.group-edit-card {
  min-width: 0;
}

.grade-group-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.grade-group-card strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.grade-group-card small,
.grade-group-card p {
  color: var(--muted);
}

.grade-group-card p {
  margin: 0;
}

.member-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.member-chip-list span {
  display: inline-grid;
  gap: 2px;
  max-width: 160px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  font-weight: 900;
}

.member-chip-list small {
  color: var(--muted);
  font-weight: 700;
}

.compact-empty {
  padding: 12px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease);
}

.list-row:hover {
  border-color: var(--primary);
  background: white;
}

.list-row.plain {
  color: var(--text);
  border: none;
  border-bottom: 1px solid #EDF1F5;
  border-radius: 0;
  background: transparent;
  padding: 12px 4px;
}

.list-row.plain:hover {
  background: #F9FBFC;
  border-bottom-color: #DDE5EC;
}

.announcement-row p,
.evaluation-row p,
.certificate-row p {
  margin: 4px 0 0;
  color: var(--text);
  white-space: pre-wrap;
}

.certificate-row {
  grid-template-columns: minmax(0, 1fr) 168px;
  align-items: stretch;
}

.certificate-main {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.certificate-preview {
  width: 168px;
  height: 124px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--muted);
  position: relative;
}

.certificate-preview img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: white;
}

.certificate-preview > span {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.88);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.drive-quota-number {
  min-width: 180px;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.drive-quota-number span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.drive-quota-number strong {
  color: var(--ink);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 30px;
  line-height: 1;
}

.drive-meter {
  height: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
}

.drive-meter span {
  min-width: 4px;
  max-width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.drive-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.drive-upload label {
  margin-bottom: 0;
}

.drive-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.drive-folders {
  position: sticky;
  top: 24px;
}

.drive-folder-form {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.drive-folder-form label {
  margin-bottom: 0;
}

.drive-folder-list {
  display: grid;
  gap: 8px;
}

.drive-folder-list a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

.drive-folder-list a:hover,
.drive-folder-list a:focus-visible,
.drive-folder-list a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.drive-folder-list span {
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.drive-folder-delete {
  margin-top: 14px;
}

.drive-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.drive-file-main {
  min-width: 0;
}

.drive-file-main strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.task-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.task-row > div,
.forum-row > div,
.post-title-line {
  min-width: 0;
}

.task-row p,
.task-response-cell {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-attachment-actions {
  margin-top: 14px;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid oklch(86% 0.04 215);
  border-radius: var(--radius-sm);
  background: oklch(98% 0.014 218);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.upload-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: oklch(90% 0.018 230);
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 160ms var(--ease);
}

.return-note {
  display: block;
  margin-top: 8px;
  color: var(--danger);
}

.return-form {
  display: grid;
  gap: 8px;
  min-width: 190px;
  margin: 0;
}

.return-form input {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 13px;
}

.notice-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.notice-box p {
  margin: 0;
}

.notice-box.danger {
  border-color: oklch(82% 0.08 27);
  background: var(--danger-soft);
  color: var(--danger);
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(11 18 32 / 0.72);
  backdrop-filter: blur(8px);
}

.preview-modal[hidden] {
  display: none;
}

.preview-dialog {
  width: min(1080px, 100%);
  height: min(760px, calc(100vh - 48px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 70px rgb(11 18 32 / 0.32);
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-body {
  min-height: 0;
  display: grid;
  place-items: center;
  background: oklch(96% 0.008 235);
}

.preview-frame,
.preview-media {
  width: 100%;
  height: 100%;
  border: 0;
}

.preview-media {
  object-fit: contain;
  background: #111827;
}

body.modal-open {
  overflow: hidden;
}

.file-preview {
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
}

.file-preview strong {
  color: var(--primary-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 24px;
}

.file-preview span {
  font-size: 12px;
  font-weight: 900;
}

.code-card {
  min-width: 190px;
  display: grid;
  gap: 4px;
  justify-items: end;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.code-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.code-card strong {
  color: var(--primary-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 34px;
  letter-spacing: 0;
}

.tool-code-panel {
  display: grid;
  gap: 14px;
}

.tool-code-box {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.tool-code-box textarea {
  min-height: 104px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-all;
  resize: vertical;
}

.tool-code-box .muted {
  color: var(--muted);
  font-weight: 800;
}

.pdf-tool-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}

.pdf-tool-panel,
.pdf-preview-panel {
  min-width: 0;
}

.pdf-tool-panel {
  align-self: start;
  display: grid;
  gap: 16px;
}

.pdf-dropzone {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--text);
  text-align: center;
  cursor: pointer;
  transition: border-color 180ms var(--ease), background 180ms var(--ease), transform 180ms var(--ease);
}

.pdf-dropzone:hover,
.pdf-dropzone:focus-within,
.pdf-dropzone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-1px);
}

.pdf-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pdf-drop-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
  color: var(--primary-dark);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 22px;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.pdf-dropzone strong {
  color: var(--ink);
  font-size: 18px;
}

.pdf-dropzone small,
.pdf-file-card small,
.pdf-note p {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.6;
}

.pdf-file-card,
.pdf-note {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.pdf-file-card span,
.pdf-note strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.pdf-file-card strong {
  color: var(--ink);
  word-break: break-all;
}

.pdf-status-error {
  color: var(--danger) !important;
}

.pdf-preview-frame {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(45deg, oklch(97.5% 0.006 235) 25%, transparent 25%),
    linear-gradient(-45deg, oklch(97.5% 0.006 235) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, oklch(97.5% 0.006 235) 75%),
    linear-gradient(-45deg, transparent 75%, oklch(97.5% 0.006 235) 75%);
  background-color: var(--surface-raised);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.pdf-preview-frame iframe {
  width: 100%;
  height: min(78vh, 920px);
  min-height: 720px;
  display: block;
  border: 0;
  background: var(--surface-raised);
}

.pdf-preview-frame .empty-inline {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  min-height: 0;
  border: 1px dashed var(--line);
  background: rgb(255 255 255 / 0.72);
}

@media (max-width: 900px) {
  .pdf-tool-shell {
    grid-template-columns: 1fr;
  }

  .pdf-dropzone {
    min-height: 168px;
  }

  .pdf-preview-frame,
  .pdf-preview-frame iframe {
    min-height: 68vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-dropzone {
    transition: none;
  }

  .pdf-dropzone:hover,
  .pdf-dropzone:focus-within,
  .pdf-dropzone.is-dragging {
    transform: none;
  }
}

.resource-grid,
.lesson-list {
  display: grid;
  gap: 14px;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resource-card,
.lesson-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.resource-card {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
}

.resource-card.is-inactive {
  opacity: 0.68;
  border-style: dashed;
  background: oklch(97% 0.008 235);
}

.resource-card .row-actions {
  grid-column: 1 / -1;
}

.resource-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-muted);
  color: var(--primary-dark);
}

.resource-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-icon strong {
  font-size: 28px;
}

.resource-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-title h3,
.lesson-card h3 {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.resource-card p,
.lesson-card p {
  margin: 6px 0;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.resource-card small {
  overflow-wrap: anywhere;
}

.lesson-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-head {
  align-items: flex-start;
}

.chapter-card {
  background: oklch(98% 0.006 235);
}

.chapter-upload {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px dashed oklch(78% 0.045 225);
  border-radius: var(--radius-sm);
  background: white;
}

.nested-lessons {
  margin-top: 2px;
}

.lesson-video-card {
  background: white;
}

.activity-center-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.activity-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 12px 0;
  background: oklch(99% 0.004 235 / 0.88);
  backdrop-filter: blur(14px);
}

.activity-topbar a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.activity-topbar > a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
}

.activity-topbar > a strong {
  font-size: 26px;
  letter-spacing: 0;
}

.activity-topbar div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.activity-portal-hero,
.activity-detail-hero {
  min-height: 320px;
  display: grid;
  align-items: end;
  padding: clamp(28px, 5vw, 56px);
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(120deg, oklch(32% 0.08 250 / 0.92), oklch(46% 0.12 170 / 0.86));
  color: white;
}

.activity-portal-hero h1,
.activity-detail-hero h1 {
  max-width: 780px;
  margin: 6px 0;
  color: white;
  font-size: clamp(38px, 7vw, 76px);
}

.activity-portal-hero h1 {
  display: grid;
  gap: 0;
  line-height: 0.95;
}

.activity-portal-hero h1 span {
  font-size: clamp(54px, 11vw, 132px);
  color: white;
}

.activity-portal-hero h1 strong {
  font-size: clamp(36px, 6vw, 72px);
  color: oklch(91% 0.11 88);
}

.activity-portal-hero p,
.activity-detail-hero p {
  max-width: 680px;
  color: oklch(94% 0.01 250);
  font-size: 18px;
}

.activity-detail-hero {
  position: relative;
  min-height: 420px;
}

.activity-detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.activity-detail-hero > div {
  position: relative;
  z-index: 1;
}

.activity-event-hero {
  margin-bottom: 22px;
}

.activity-current-strip,
.activity-current-card {
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid oklch(100% 0 0 / 0.38);
  border-radius: var(--radius-sm);
  background: oklch(100% 0 0 / 0.16);
  color: white;
}

.activity-current-strip span,
.activity-current-card span {
  font-size: 13px;
  font-weight: 900;
  color: oklch(90% 0.04 95);
}

.activity-current-strip strong,
.activity-current-card strong {
  font-size: 22px;
}

.activity-dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: clamp(24px, 5vw, 46px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, oklch(34% 0.09 250), oklch(50% 0.13 165));
  color: white;
}

.activity-dashboard-hero.phase-muted {
  background: linear-gradient(135deg, oklch(48% 0.012 250), oklch(62% 0.018 250));
}

.activity-dashboard-hero h1 {
  margin: 8px 0;
  color: white;
  font-size: clamp(34px, 6vw, 64px);
}

.activity-stage-orbit-section,
.activity-module-showcase {
  margin: 22px 0;
}

.activity-carousel {
  position: relative;
  min-height: 440px;
  display: grid;
  align-items: center;
  overflow: hidden;
  perspective: 1200px;
}

.carousel-stage {
  position: relative;
  height: 390px;
  transform-style: preserve-3d;
}

.activity-orbit-card {
  position: absolute;
  top: 24px;
  left: 50%;
  width: min(560px, 76vw);
  min-height: 320px;
  display: grid;
  align-content: end;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-decoration: none;
  transform: translateX(-50%);
  transition: transform 360ms ease, opacity 360ms ease, filter 360ms ease;
}

.activity-orbit-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.activity-orbit-card > div {
  position: relative;
  z-index: 1;
  padding: 18px;
  border-radius: var(--radius-sm);
  background: oklch(99% 0.004 250 / 0.9);
}

.activity-orbit-card[data-position="0"] {
  opacity: 1;
  z-index: 5;
  transform: translateX(-50%) rotateY(0deg) translateZ(160px) scale(1);
}

.activity-orbit-card[data-position="1"] {
  opacity: 0.58;
  z-index: 4;
  filter: blur(0.4px);
  transform: translateX(-16%) rotateY(-46deg) translateZ(-10px) scale(0.78);
}

.activity-orbit-card[data-position="-1"] {
  opacity: 0.58;
  z-index: 4;
  filter: blur(0.4px);
  transform: translateX(-84%) rotateY(46deg) translateZ(-10px) scale(0.78);
}

.activity-orbit-card[data-position="2"],
.activity-orbit-card[data-position="-2"] {
  opacity: 0.2;
  z-index: 2;
  filter: blur(1.5px);
  transform: translateX(-50%) translateZ(-280px) scale(0.62);
}

.activity-orbit-card[data-position="3"],
.activity-orbit-card[data-position="-3"] {
  opacity: 0;
  pointer-events: none;
}

.carousel-control {
  position: absolute;
  z-index: 8;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 28px;
  cursor: pointer;
}

.carousel-control[data-carousel-prev] {
  left: 12px;
}

.carousel-control[data-carousel-next] {
  right: 12px;
}

.activity-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.stage-orbit {
  position: relative;
  min-height: 330px;
  display: grid;
  place-items: center;
  margin: 16px 0;
  border: 1px dashed oklch(78% 0.04 230);
  border-radius: 999px;
  background: radial-gradient(circle, oklch(98% 0.014 220), transparent 62%);
}

.stage-orbit.small {
  min-height: 250px;
}

.stage-orb {
  position: absolute;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 2px solid white;
  border-radius: 999px;
  background: oklch(74% 0.15 165);
  color: white;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 18px 34px oklch(30% 0.06 230 / 0.18);
  transition: transform 220ms ease, opacity 220ms ease, filter 220ms ease;
}

.stage-orb strong {
  font-size: 17px;
  line-height: 1.2;
}

.stage-orb span,
.stage-orb small {
  font-size: 12px;
  font-weight: 900;
}

.stage-orb.stage-current {
  width: 190px;
  height: 190px;
  z-index: 4;
  background: linear-gradient(135deg, oklch(72% 0.17 74), oklch(62% 0.18 35));
  animation: stagePulse 2.4s ease-in-out infinite;
  transform: translate(0, 0) scale(1) !important;
}

.stage-orb.stage-past {
  background: oklch(65% 0.012 250);
  opacity: 0.58;
  filter: grayscale(0.5);
}

.stage-orb.stage-future {
  background: oklch(70% 0.07 245);
  opacity: 0.42;
}

.stage-orb.is-selected {
  outline: 4px solid oklch(83% 0.16 90 / 0.8);
}

.stage-orb:nth-child(1) { transform: translate(-260px, 0) scale(0.82); }
.stage-orb:nth-child(2) { transform: translate(-120px, -110px) scale(0.9); }
.stage-orb:nth-child(3) { transform: translate(0, 0); }
.stage-orb:nth-child(4) { transform: translate(120px, 110px) scale(0.9); }
.stage-orb:nth-child(5) { transform: translate(260px, 0) scale(0.82); }
.stage-orb:nth-child(n+6) { transform: translate(0, 145px) scale(0.72); }

@keyframes stagePulse {
  0%, 100% { box-shadow: 0 18px 34px oklch(55% 0.17 55 / 0.28); }
  50% { box-shadow: 0 20px 48px oklch(68% 0.18 70 / 0.48); }
}

.activity-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.activity-module-grid.compact {
  grid-template-columns: 1fr;
}

.activity-manager-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.activity-manager-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
  color: var(--activity-text);
  text-decoration: none;
  transition: border-color 170ms var(--ease), background-color 170ms var(--ease), transform 170ms var(--ease);
}

.activity-manager-card:hover,
.activity-manager-card:focus-visible {
  border-color: oklch(68% 0.1 185);
  background: oklch(96% 0.024 185);
  color: var(--activity-text);
  transform: translateY(-2px);
}

.activity-manager-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--activity-soft);
  color: var(--activity-accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.activity-manager-card strong {
  color: var(--activity-ink);
  font-size: 22px;
  line-height: 1.2;
}

.activity-manager-card small {
  color: var(--activity-muted);
}

[hidden] {
  display: none !important;
}

.activity-announcement-strip {
  border-color: oklch(84% 0.07 85);
  background: oklch(98% 0.018 90);
}

.activity-announcement-list {
  display: grid;
  gap: 10px;
}

.activity-announcement-list article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid oklch(86% 0.05 90);
  border-radius: var(--radius-sm);
  background: white;
}

.activity-announcement-list span,
.activity-entry-card span {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--activity-soft);
  color: var(--activity-accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.activity-announcement-list p {
  margin: 0;
  color: var(--activity-text);
}

.activity-entry-choice,
.activity-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.activity-entry-card {
  min-height: 160px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
  color: var(--activity-text);
  text-decoration: none;
  transition: border-color 170ms var(--ease), background-color 170ms var(--ease), transform 170ms var(--ease);
}

.activity-entry-card:hover,
.activity-entry-card:focus-visible {
  border-color: oklch(68% 0.1 185);
  background: oklch(96% 0.024 185);
  transform: translateY(-2px);
}

.activity-entry-card strong {
  color: var(--activity-ink);
  font-size: 22px;
}

.stats-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--activity-line);
}

.metric-row:last-child {
  border-bottom: 0;
}

.metric-row strong {
  color: var(--activity-ink);
  font-variant-numeric: tabular-nums;
}

.control-extra-panel {
  display: grid;
  gap: 12px;
}

.group-option-builder {
  display: grid;
  gap: 8px;
}

.group-option-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(160px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
}

@media (max-width: 760px) {
  .group-option-row {
    grid-template-columns: 1fr;
  }
}

.activity-module-card {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  text-decoration: none;
  color: var(--ink);
}

.activity-module-card.is-open {
  background: white;
  box-shadow: var(--shadow);
}

.activity-module-card.is-locked {
  cursor: pointer;
  background: linear-gradient(135deg, oklch(92% 0.006 250), oklch(88% 0.006 250));
  color: oklch(48% 0.01 250);
  opacity: 0.76;
}

.activity-module-card span {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.activity-module-card strong {
  font-size: 20px;
}

.phase-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.phase-card.is-current {
  border-color: oklch(62% 0.13 170);
  background: oklch(97% 0.025 170);
}

.phase-card h3 {
  margin: 0;
}

.phase-card p {
  margin: 0;
  color: var(--muted);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.compact-checks {
  max-height: 280px;
  overflow: auto;
}

.inline-create-panel {
  margin: 12px 0 16px;
}

.inline-create-panel > summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
}

.inline-create-panel > summary::-webkit-details-marker {
  display: none;
}

.inline-create-panel > form {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.section-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--line);
}

.check-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.check-card span {
  color: var(--muted);
  font-size: 13px;
}

.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.award-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, white, oklch(97% 0.018 95));
}

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

.section-head-inline h2 {
  margin: 0 0 4px;
}

.section-head-inline p {
  margin: 0;
  color: var(--muted);
}

.activity-award-admin .form-grid {
  align-items: start;
}

.activity-award-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.activity-award-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.activity-award-person input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.activity-award-person span {
  min-width: 0;
}

.activity-award-person strong,
.activity-award-person small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-award-person small {
  color: var(--muted);
}

.activity-award-person em {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.activity-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.activity-control-card {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--activity-line, var(--line));
  border-radius: var(--radius);
  background: var(--surface);
}

.activity-control-card h3 {
  margin: 0;
}

.activity-control-card p,
.activity-control-card small {
  margin: 0;
  color: var(--muted);
}

.activity-control-card form {
  display: grid;
  gap: 8px;
}

.activity-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  align-items: start;
  gap: 14px;
}

.activity-submit-row.is-disabled {
  opacity: 0.66;
  background: oklch(95% 0.004 250);
}

.locked-hint {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: oklch(92% 0.01 250);
  color: var(--muted);
  font-weight: 900;
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.activity-submit-row form {
  display: grid;
  gap: 8px;
}

.rich-content {
  font-size: 16px;
  line-height: 1.8;
}

.rich-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.inline-form {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.inline-input {
  width: min(160px, 100%);
  min-height: 34px;
}

.compact-quick {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.danger-zone {
  border-color: oklch(67% 0.18 25);
}

@media (max-width: 760px) {
  .activity-carousel {
    min-height: 360px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    perspective: none;
  }

  .carousel-stage {
    display: flex;
    gap: 14px;
    height: auto;
    padding: 10px 54px;
  }

  .activity-orbit-card,
  .activity-orbit-card[data-position] {
    position: relative;
    inset: auto;
    left: auto;
    flex: 0 0 min(82vw, 360px);
    min-height: 300px;
    opacity: 1;
    filter: none;
    transform: none;
    scroll-snap-align: center;
  }

  .activity-submit-row {
    grid-template-columns: 1fr;
  }
}

.activity-center-page {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 72px;
  --activity-ink: oklch(18% 0.04 245);
  --activity-text: oklch(29% 0.035 245);
  --activity-muted: oklch(47% 0.03 245);
  --activity-line: oklch(85% 0.018 235);
  --activity-soft: oklch(96% 0.018 225);
  --activity-accent: oklch(54% 0.13 185);
  --activity-accent-dark: oklch(34% 0.1 195);
  --activity-warn: oklch(56% 0.14 70);
}

.activity-center-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, oklch(88% 0.05 190 / 0.55), transparent 32vw),
    radial-gradient(circle at 88% 8%, oklch(85% 0.045 245 / 0.42), transparent 28vw),
    linear-gradient(180deg, oklch(98% 0.006 235), oklch(94% 0.016 235));
}

.activity-topbar {
  min-height: 68px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 0 0 22px;
  padding: 10px 0;
  background: oklch(97% 0.008 235 / 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.activity-brand {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--activity-ink);
  text-decoration: none;
}

.activity-brand:hover {
  color: var(--activity-ink);
}

.activity-brand strong {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1;
  letter-spacing: 0;
}

.activity-brand span {
  color: var(--activity-muted);
  font-weight: 900;
}

.activity-topbar div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.activity-topbar div a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--activity-text);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  transition: background-color 170ms var(--ease), color 170ms var(--ease), transform 170ms var(--ease);
}

.activity-topbar div a:hover,
.activity-topbar div a:focus-visible {
  background: oklch(90% 0.032 190);
  color: var(--activity-accent-dark);
}

.activity-topbar-actions {
  justify-content: flex-end;
}

.activity-user-meta {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--activity-line);
  border-radius: 999px;
  background: white;
  color: var(--activity-ink);
  font-size: 13px;
  font-weight: 900;
}

.activity-user-meta small {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--activity-soft);
  color: var(--activity-accent-dark);
  font-size: 12px;
}

.activity-icon-link {
  position: relative;
  gap: 7px;
}

.activity-bell {
  width: 14px;
  height: 15px;
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 4px 4px;
}

.activity-bell::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 6px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.activity-bell::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -5px;
  width: 7px;
  height: 7px;
  border: 2px solid white;
  border-radius: 50%;
  background: oklch(62% 0.19 35);
  opacity: 0;
}

.activity-icon-link.has-unread .activity-bell::after {
  opacity: 1;
}

.activity-icon-link small {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: oklch(62% 0.19 35);
  color: white;
  font-size: 11px;
  line-height: 1;
}

.activity-staff-bridge {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 8px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 10px rgb(18 35 48 / 0.06);
}

.activity-staff-bridge span,
.activity-staff-bridge a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.activity-staff-bridge span {
  background: var(--activity-soft);
  color: var(--activity-accent-dark);
}

.activity-staff-bridge a {
  color: var(--activity-ink);
}

.activity-staff-bridge a:hover,
.activity-staff-bridge a:focus-visible {
  background: oklch(94% 0.025 185);
  color: var(--activity-accent-dark);
}

.activity-portal-hero,
.activity-detail-hero,
.activity-dashboard-hero,
.activity-phase-hero {
  position: relative;
  min-height: clamp(360px, 56vh, 560px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: stretch;
  overflow: hidden;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid oklch(92% 0.01 235 / 0.7);
  border-radius: 16px;
  background:
    linear-gradient(135deg, oklch(20% 0.05 245), oklch(30% 0.07 210) 48%, oklch(45% 0.1 185));
  color: white;
}

.activity-dashboard-hero,
.activity-phase-hero {
  min-height: 300px;
}

.activity-phase-hero.is-muted {
  background:
    linear-gradient(135deg, oklch(34% 0.018 245), oklch(46% 0.018 235));
}

.activity-hero-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 16px;
}

.activity-kicker {
  margin: 0;
  padding: 7px 10px;
  border: 1px solid oklch(100% 0 0 / 0.24);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.1);
  color: oklch(91% 0.05 185);
  font-size: 13px;
  font-weight: 900;
}

.activity-hero-copy h1,
.activity-section-head h2 {
  margin: 0;
  text-wrap: balance;
  letter-spacing: 0;
}

.activity-hero-copy h1 {
  max-width: 760px;
  color: white;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.96;
}

.activity-hero-copy p {
  max-width: 62ch;
  margin: 0;
  color: oklch(93% 0.014 225);
  font-size: clamp(16px, 2vw, 19px);
  text-wrap: pretty;
}

.activity-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.button.ghost.light {
  border-color: oklch(100% 0 0 / 0.35);
  background: oklch(100% 0 0 / 0.1);
  color: white;
}

.button.ghost.light:hover,
.button.ghost.light:focus-visible {
  background: oklch(100% 0 0 / 0.18);
  color: white;
}

.activity-hero-signal,
.activity-cover-field {
  min-height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  background: oklch(100% 0 0 / 0.08);
  border: 1px solid oklch(100% 0 0 / 0.16);
}

.activity-cover-field img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.activity-cover-fallback,
.activity-event-fallback {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: oklch(92% 0.035 190);
  background:
    radial-gradient(circle at 30% 28%, oklch(78% 0.08 185 / 0.55), transparent 32%),
    linear-gradient(145deg, oklch(24% 0.055 240), oklch(38% 0.08 190));
}

.activity-cover-fallback span,
.activity-event-fallback span {
  font-size: clamp(28px, 6vw, 68px);
  font-weight: 1000;
}

.activity-cover-fallback strong {
  color: oklch(86% 0.08 185);
  font-size: 18px;
  letter-spacing: 0.12em;
}

.signal-board {
  z-index: 2;
  width: min(260px, 80%);
  display: grid;
  gap: 6px;
  padding: 24px;
  border: 1px solid oklch(100% 0 0 / 0.22);
  border-radius: 14px;
  background: oklch(16% 0.04 245 / 0.72);
  color: white;
}

.signal-board span {
  color: oklch(82% 0.07 185);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.signal-board strong {
  font-size: clamp(62px, 11vw, 116px);
  line-height: 0.9;
}

.signal-board small {
  color: oklch(90% 0.016 225);
  font-weight: 800;
}

.signal-ring,
.signal-ring i {
  position: absolute;
  border-radius: 50%;
}

.signal-ring {
  inset: 28px;
  border: 1px solid oklch(100% 0 0 / 0.16);
}

.signal-ring i {
  width: 12px;
  height: 12px;
  background: oklch(78% 0.13 185);
  transform-origin: 124px 124px;
}

.signal-ring i:nth-child(1) { transform: translate(112px, 8px); }
.signal-ring i:nth-child(2) { transform: translate(218px, 160px); }
.signal-ring i:nth-child(3) { transform: translate(32px, 210px); }

.activity-current-panel {
  width: min(360px, 100%);
  display: grid;
  gap: 6px;
  align-self: end;
  padding: 18px;
  border: 1px solid oklch(100% 0 0 / 0.22);
  border-radius: 14px;
  background: oklch(100% 0 0 / 0.12);
  color: white;
}

.activity-current-panel span {
  color: oklch(85% 0.065 185);
  font-size: 13px;
  font-weight: 900;
}

.activity-current-panel strong {
  color: white;
  font-size: 24px;
  line-height: 1.2;
}

.activity-current-panel small {
  color: oklch(91% 0.014 225);
}

.activity-section {
  margin: clamp(26px, 5vw, 52px) 0;
}

.activity-section-head {
  max-width: 760px;
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.activity-section-head.compact {
  margin-bottom: 14px;
}

.activity-section-head h2 {
  color: var(--activity-ink);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
}

.activity-section-head.compact h2 {
  font-size: 24px;
}

.activity-section-head p {
  max-width: 65ch;
  margin: 0;
  color: var(--activity-muted);
  text-wrap: pretty;
}

.activity-event-board {
  display: grid;
  gap: 14px;
}

.activity-event-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 126px;
  gap: 18px;
  align-items: stretch;
  padding: 14px;
  border: 1px solid var(--activity-line);
  border-radius: 14px;
  background: oklch(99% 0.004 235);
  color: var(--activity-ink);
  text-decoration: none;
  transition: transform 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.activity-event-row:hover,
.activity-event-row:focus-visible {
  transform: translateY(-2px);
  border-color: oklch(70% 0.08 185);
  background: white;
  color: var(--activity-ink);
}

.activity-event-row.is-featured {
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr) 140px;
  min-height: 260px;
}

.activity-event-media {
  overflow: hidden;
  border-radius: 10px;
  background: oklch(90% 0.015 235);
}

.activity-event-media img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
}

.activity-event-main {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.activity-event-main span,
.activity-task-row span,
.activity-submit-copy span {
  color: var(--activity-muted);
  font-size: 13px;
  font-weight: 900;
}

.activity-event-main h3 {
  margin: 0;
  color: var(--activity-ink);
  font-size: clamp(24px, 4vw, 44px);
  line-height: 1.05;
  text-wrap: balance;
}

.activity-event-main p {
  max-width: 62ch;
  margin: 0;
  color: var(--activity-text);
  text-wrap: pretty;
}

.activity-event-side {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border-left: 1px solid var(--activity-line);
  color: var(--activity-muted);
  text-align: center;
}

.activity-event-side strong {
  color: var(--activity-accent-dark);
  font-size: 36px;
  line-height: 1;
}

.activity-login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 22px;
  align-items: stretch;
  margin: 28px 0;
}

.activity-login-copy,
.activity-login-panel {
  border: 1px solid var(--activity-line);
  border-radius: 16px;
  background: white;
}

.activity-login-copy {
  min-height: 360px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 18% 22%, oklch(90% 0.05 185 / 0.8), transparent 34%),
    radial-gradient(circle at 78% 18%, oklch(83% 0.04 220 / 0.55), transparent 32%),
    linear-gradient(135deg, oklch(98% 0.008 235), white);
}

.activity-login-copy h1 {
  max-width: 11ch;
  margin: 0;
  color: var(--activity-ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  text-wrap: balance;
}

.activity-login-copy p:not(.activity-kicker) {
  max-width: 56ch;
  margin: 0;
  color: var(--activity-text);
  text-wrap: pretty;
}

.activity-login-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(22px, 4vw, 34px);
}

.activity-login-panel .form-title {
  margin-bottom: 2px;
}

.activity-login-panel .form-title span {
  color: var(--activity-muted);
  font-size: 12px;
  font-weight: 900;
}

.activity-login-panel .form-title h2 {
  margin: 4px 0 0;
  color: var(--activity-ink);
}

@property --bubble-lift {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.stage-orbit {
  --orbit-size: min(560px, calc(100vw - 64px));
  width: var(--orbit-size);
  min-height: var(--orbit-size);
  position: relative;
  display: grid;
  place-items: center;
  margin: 18px auto;
  border: 1px solid oklch(80% 0.03 220);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, oklch(100% 0 0) 0 22%, transparent 22.5%),
    radial-gradient(circle at center, oklch(93% 0.02 205) 0 46%, transparent 46.5%),
    oklch(96% 0.012 235);
}

.stage-orbit--compact {
  --orbit-size: min(460px, calc(100vw - 64px));
}

.stage-orb {
  --angle: calc((360deg / max(var(--count), 1)) * var(--i) - 90deg);
  --distance: calc(var(--orbit-size) * 0.34);
  --bubble-scale: 1;
  position: absolute;
  width: clamp(118px, 18vw, 156px);
  min-height: clamp(118px, 18vw, 156px);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  padding: 14px;
  border: 1px solid oklch(100% 0 0);
  border-radius: 50%;
  background: oklch(98% 0.006 235);
  color: var(--activity-ink);
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 8px 18px rgb(18 35 48 / 0.1);
  transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))) translateY(var(--bubble-lift)) scale(var(--bubble-scale));
  transition: transform 180ms var(--ease), opacity 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
  animation: none;
}

.stage-orb::before {
  content: "";
  position: absolute;
  inset: 10%;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 24%, oklch(100% 0 0 / 0.72), transparent 0 16%, transparent 28%),
    radial-gradient(circle at 72% 76%, oklch(100% 0 0 / 0.32), transparent 0 18%, transparent 30%);
  opacity: 0.78;
  transform: rotate(calc(var(--i) * 18deg));
  animation: none;
}

.stage-orb > * {
  position: relative;
  z-index: 1;
}

.stage-orb:hover,
.stage-orb:focus-visible {
  --bubble-scale: 1.04;
  color: var(--activity-ink);
}

.stage-orb strong {
  color: inherit;
  font-size: 17px;
  line-height: 1.2;
  text-wrap: balance;
}

.stage-orb span,
.stage-orb small {
  font-size: 12px;
  font-weight: 900;
}

.stage-orb.stage-current {
  z-index: 3;
  width: clamp(160px, 22vw, 210px);
  min-height: clamp(160px, 22vw, 210px);
  background: var(--activity-accent-dark);
  color: white;
  transform: translate(0, 0) scale(1);
  animation: none;
}

.stage-orb.stage-current::before {
  background:
    radial-gradient(circle at 28% 22%, oklch(100% 0 0 / 0.5), transparent 0 18%, transparent 30%),
    radial-gradient(circle at 70% 72%, oklch(82% 0.14 185 / 0.36), transparent 0 22%, transparent 36%);
}

.stage-orb.stage-current:hover,
.stage-orb.stage-current:focus-visible {
  transform: translate(0, 0) scale(1.03);
}

.stage-orb.stage-current span,
.stage-orb.stage-current small {
  color: oklch(88% 0.055 185);
}

.stage-orb.stage-past {
  opacity: 0.56;
  background: oklch(90% 0.008 235);
  color: oklch(45% 0.018 245);
}

.stage-orb.stage-future {
  opacity: 0.62;
  border-style: dashed;
  background: oklch(96% 0.01 245);
  color: oklch(39% 0.03 245);
}

.stage-orb.is-selected {
  outline: 3px solid oklch(76% 0.11 185 / 0.7);
  outline-offset: 3px;
}

.stage-orbit:hover .stage-orb {
  animation-play-state: paused;
}

.stage-orbit.is-previewing .stage-orb.stage-current.is-current-side {
  z-index: 2;
  width: clamp(118px, 18vw, 156px);
  min-height: clamp(118px, 18vw, 156px);
  opacity: 0.92;
  background: var(--activity-accent-dark);
  color: white;
  transform: rotate(var(--angle)) translate(var(--distance)) rotate(calc(-1 * var(--angle))) translateY(var(--bubble-lift)) scale(var(--bubble-scale));
  animation: none;
}

.stage-orbit.is-previewing .stage-orb.is-preview {
  z-index: 4;
  width: clamp(160px, 22vw, 210px);
  min-height: clamp(160px, 22vw, 210px);
  opacity: 0.92;
  transform: translate(0, 0) scale(1.02);
  animation: none;
}

.stage-orbit.is-previewing .stage-orb.is-preview.stage-past,
.stage-orbit.is-previewing .stage-orb.is-preview.stage-future {
  background: oklch(90% 0.008 235);
  border-style: solid;
  color: oklch(35% 0.024 245);
  filter: grayscale(0.25);
}

@keyframes stageCurrentGlow {
  0% {
    box-shadow: 0 16px 32px oklch(48% 0.12 185 / 0.24), inset 0 0 0 1px oklch(92% 0.05 185 / 0.18);
  }
  100% {
    box-shadow: 0 20px 48px oklch(62% 0.16 185 / 0.42), inset 0 0 0 1px oklch(96% 0.07 185 / 0.32);
  }
}

@keyframes stageBubbleFloat {
  0% {
    --bubble-lift: -5px;
    opacity: 0.52;
  }
  100% {
    --bubble-lift: 6px;
    opacity: 0.78;
  }
}

@keyframes stageBubbleSheen {
  0% {
    opacity: 0.45;
    transform: translate(-2px, -1px) rotate(calc(var(--i) * 18deg));
  }
  100% {
    opacity: 0.88;
    transform: translate(3px, 2px) rotate(calc(var(--i) * 18deg + 8deg));
  }
}

@keyframes stagePreviewPulse {
  0% {
    box-shadow: 0 14px 30px rgb(22 34 48 / 0.13), inset 0 0 0 1px oklch(100% 0 0 / 0.32);
  }
  100% {
    box-shadow: 0 18px 42px rgb(22 34 48 / 0.2), inset 0 0 0 1px oklch(100% 0 0 / 0.48);
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage-orb,
  .stage-orb::before,
  .stage-orb.stage-current,
  .stage-orbit.is-previewing .stage-orb.is-preview,
  .stage-orbit.is-previewing .stage-orb.stage-current.is-current-side {
    animation: none;
    transition-duration: 1ms;
  }
}

.stage-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scroll-snap-type: x mandatory;
}

.stage-rail-item {
  flex: 0 0 220px;
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: oklch(99% 0.004 235);
  color: var(--activity-text);
  text-decoration: none;
  scroll-snap-align: start;
}

.stage-rail-item.is-selected,
.stage-rail-item.stage-current {
  border-color: oklch(68% 0.1 185);
  background: oklch(94% 0.032 185);
  color: var(--activity-accent-dark);
}

.stage-rail-item.stage-past {
  opacity: 0.62;
}

.activity-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.activity-module-grid.compact {
  grid-template-columns: 1fr;
}

.activity-module-card {
  min-height: 150px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  text-align: left;
  text-decoration: none;
  color: var(--activity-ink);
  transition: transform 170ms var(--ease), border-color 170ms var(--ease), background-color 170ms var(--ease), opacity 170ms var(--ease);
}

.activity-module-card.is-open {
  background: white;
}

.activity-module-card.is-open:hover,
.activity-module-card.is-open:focus-visible {
  transform: translateY(-2px);
  border-color: oklch(69% 0.09 185);
  color: var(--activity-ink);
}

.activity-module-card.is-locked {
  cursor: pointer;
  background:
    linear-gradient(135deg, oklch(92% 0.006 235), oklch(88% 0.008 235));
  color: oklch(45% 0.018 245);
  opacity: 0.82;
}

.activity-module-card.is-locked:hover,
.activity-module-card.is-locked:focus-visible {
  opacity: 1;
  border-color: oklch(75% 0.03 235);
}

.activity-module-card span {
  color: var(--activity-muted);
  font-size: 12px;
  font-weight: 900;
}

.activity-module-card strong {
  color: inherit;
  font-size: 21px;
  line-height: 1.15;
}

.activity-module-card small {
  color: inherit;
  line-height: 1.55;
}

.activity-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 16px;
  align-items: start;
  margin: clamp(26px, 5vw, 48px) 0;
}

.activity-panel,
.activity-empty-state {
  border: 1px solid var(--activity-line);
  border-radius: 14px;
  background: oklch(99% 0.004 235);
}

.activity-panel {
  padding: clamp(18px, 3vw, 28px);
}

.activity-panel--main {
  min-height: 280px;
}

.activity-empty-state {
  display: grid;
  gap: 6px;
  padding: 22px;
  color: var(--activity-muted);
}

.activity-empty-state.compact {
  padding: 16px;
}

.activity-empty-state strong {
  color: var(--activity-ink);
}

.activity-empty-state p {
  margin: 0;
}

.activity-task-list,
.activity-submit-list {
  display: grid;
  gap: 10px;
}

.activity-task-list.compact {
  gap: 8px;
}

.activity-task-row {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
  color: var(--activity-ink);
  text-decoration: none;
}

.activity-task-row:hover,
.activity-task-row:focus-visible {
  border-color: oklch(70% 0.08 185);
  color: var(--activity-ink);
}

.activity-task-row div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.activity-task-row strong {
  color: inherit;
  text-wrap: pretty;
}

.activity-task-row small {
  flex: 0 0 auto;
  color: var(--activity-muted);
  font-weight: 800;
}

.activity-submit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--activity-line);
  border-radius: 14px;
  background: white;
}

.activity-submit-row.is-disabled {
  opacity: 0.72;
  background: oklch(95% 0.006 235);
}

.activity-submit-copy {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.activity-submit-copy h3 {
  margin: 0;
  color: var(--activity-ink);
  font-size: 24px;
  line-height: 1.15;
}

.activity-submit-copy p {
  max-width: 68ch;
  margin: 0;
  color: var(--activity-text);
}

.activity-submit-copy small {
  color: var(--activity-muted);
}

.activity-submit-row form {
  display: grid;
  gap: 10px;
}

.activity-submit-row label {
  display: grid;
  gap: 6px;
  color: var(--activity-ink);
  font-weight: 900;
}

.activity-sheet-form {
  display: grid;
  gap: 10px;
}

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

.sheet-fixed-grid div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--activity-line);
  border-radius: 10px;
  background: oklch(97% 0.008 235);
}

.sheet-fixed-grid span {
  color: var(--activity-muted);
  font-size: 12px;
  font-weight: 900;
}

.sheet-fixed-grid strong {
  color: var(--activity-ink);
  overflow-wrap: anywhere;
}

.locked-hint {
  width: fit-content;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 10px;
  background: oklch(90% 0.012 235);
  color: oklch(36% 0.025 245);
  font-weight: 900;
}

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

.award-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
}

.award-card h3 {
  margin: 0;
}

.rich-content {
  color: var(--activity-text);
  font-size: 16px;
  line-height: 1.8;
}

.rich-content :first-child {
  margin-top: 0;
}

.rich-content :last-child {
  margin-bottom: 0;
}

.rich-content img {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--activity-line);
}

@media (prefers-reduced-motion: no-preference) {
  .signal-ring {
    animation: activityOrbit 18s linear infinite;
  }

  .activity-portal-hero,
  .activity-detail-hero,
  .activity-dashboard-hero,
  .activity-phase-hero,
  .activity-event-row,
  .activity-panel,
  .activity-module-card {
    animation: activityEnter 420ms var(--ease) both;
  }
}

@keyframes activityOrbit {
  to { transform: rotate(360deg); }
}

@keyframes activityEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-center-page *,
  .activity-center-page *::before,
  .activity-center-page *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 860px) {
  .activity-center-page {
    width: min(100% - 20px, 1240px);
    padding-bottom: 44px;
  }

  .activity-topbar {
    min-height: auto;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    overflow: hidden;
  }

  .activity-brand {
    flex: 0 0 auto;
  }

  .activity-topbar div {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
  }

  .activity-topbar div a,
  .activity-user-meta {
    flex: 0 0 auto;
  }

  .activity-portal-hero,
  .activity-detail-hero,
  .activity-dashboard-hero,
  .activity-phase-hero,
  .activity-login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .activity-login-shell {
    padding: 0;
  }

  .activity-hero-copy h1 {
    font-size: clamp(42px, 15vw, 70px);
  }

  .activity-event-row,
  .activity-event-row.is-featured,
  .activity-workbench,
  .activity-submit-row {
    grid-template-columns: 1fr;
  }

  .activity-event-side {
    min-height: 78px;
    border-left: 0;
    border-top: 1px solid var(--activity-line);
  }

  .stage-orbit,
  .stage-orbit--compact {
    width: 100%;
    min-height: auto;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    overflow-x: auto;
    padding: 14px;
    border-radius: 14px;
    scroll-snap-type: x mandatory;
  }

  .stage-orb,
  .stage-orb.stage-current,
  .stage-orb.stage-current:hover,
  .stage-orbit.is-previewing .stage-orb.is-preview,
  .stage-orbit.is-previewing .stage-orb.stage-current,
  .stage-orb:hover,
  .stage-orb:focus-visible {
    position: relative;
    flex: 0 0 156px;
    width: 156px;
    min-height: 134px;
    transform: none;
    border-radius: 14px;
    scroll-snap-align: start;
    animation: none;
  }

  .activity-task-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.activity-section.tight {
  margin: 18px 0;
}

.button.disabled-like {
  cursor: not-allowed;
  border-color: oklch(78% 0.012 235);
  background: oklch(88% 0.008 235);
  color: oklch(43% 0.018 245);
}

.activity-command-hero,
.activity-phase-header {
  min-height: 230px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
  padding: clamp(22px, 4vw, 40px);
  border: 1px solid oklch(88% 0.018 235);
  border-radius: 16px;
  background:
    radial-gradient(circle at 86% 12%, oklch(86% 0.055 185 / 0.62), transparent 32%),
    linear-gradient(135deg, oklch(20% 0.05 245), oklch(33% 0.07 215));
  color: white;
}

.activity-command-hero h1,
.activity-phase-header h1 {
  max-width: 820px;
  margin: 10px 0;
  color: white;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: 0;
  text-wrap: balance;
}

.activity-command-hero p,
.activity-phase-header p {
  max-width: 62ch;
  margin: 0;
  color: oklch(92% 0.014 225);
  text-wrap: pretty;
}

.activity-phase-header.is-muted {
  background:
    radial-gradient(circle at 86% 12%, oklch(74% 0.018 235 / 0.36), transparent 32%),
    linear-gradient(135deg, oklch(34% 0.018 245), oklch(46% 0.018 235));
}

.activity-phase-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid oklch(100% 0 0 / 0.22);
  border-radius: 14px;
  background: oklch(100% 0 0 / 0.12);
}

.activity-phase-state span {
  color: oklch(85% 0.065 185);
  font-size: 13px;
  font-weight: 900;
}

.activity-phase-state strong {
  color: white;
  font-size: 22px;
  line-height: 1.2;
}

.activity-phase-state small {
  color: oklch(91% 0.014 225);
}

.stage-timeline {
  display: flex;
  gap: 8px;
  align-items: stretch;
  min-height: 108px;
}

.stage-timeline-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--activity-line);
  border-radius: 12px;
  background: white;
  color: var(--activity-ink);
  text-decoration: none;
  overflow: hidden;
  transition: flex-grow 180ms var(--ease), transform 180ms var(--ease), opacity 180ms var(--ease), border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.stage-timeline-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 999px;
  background: oklch(72% 0.01 235);
}

.stage-timeline-item.stage-current,
.stage-timeline-item.is-selected {
  flex-grow: 8;
  border-color: oklch(68% 0.1 185);
  background: oklch(95% 0.03 185);
  color: var(--activity-accent-dark);
}

.stage-timeline:has(.is-selected:not(.stage-current)) .stage-timeline-item.stage-current {
  flex-grow: 1;
}

.stage-timeline:has(.is-selected:not(.stage-current)) .stage-timeline-item.stage-current:hover,
.stage-timeline:has(.is-selected:not(.stage-current)) .stage-timeline-item.stage-current:focus-visible {
  flex-grow: 3;
}

.stage-timeline:has(.is-selected:not(.stage-current)) .stage-timeline-item.is-selected {
  flex-grow: 8;
}

.stage-timeline-item.stage-current::before,
.stage-timeline-item.is-selected::before {
  background: var(--activity-accent);
}

.stage-timeline-item.stage-past {
  opacity: 0.56;
  filter: grayscale(0.15);
  background: oklch(91% 0.006 235);
}

.stage-timeline-item.stage-future {
  opacity: 0.6;
  background: oklch(93% 0.006 235);
}

.stage-timeline-item:hover,
.stage-timeline-item:focus-visible {
  flex-grow: 3;
  transform: translateY(-2px);
  opacity: 0.92;
}

.stage-timeline-item.stage-current:hover,
.stage-timeline-item.is-selected:hover,
.stage-timeline-item.stage-current:focus-visible,
.stage-timeline-item.is-selected:focus-visible {
  flex-grow: 8;
}

.stage-timeline-item span {
  color: var(--activity-muted);
  font-size: 12px;
  font-weight: 900;
}

.stage-timeline-item strong {
  color: inherit;
  font-size: 18px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-workbench--dashboard {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
}

.activity-module-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
}

.activity-module-wall .activity-module-card {
  min-height: 190px;
}

.activity-module-wall .activity-module-card.is-wide {
  grid-column: span 2;
}

.activity-module-wall .activity-module-card.is-open {
  background:
    radial-gradient(circle at 88% 18%, oklch(86% 0.055 185 / 0.68), transparent 34%),
    white;
}

.activity-module-wall .activity-module-card.is-locked {
  background:
    radial-gradient(circle at 86% 16%, oklch(80% 0.012 235 / 0.32), transparent 34%),
    linear-gradient(135deg, oklch(92% 0.006 235), oklch(87% 0.008 235));
}

.activity-module-wall .activity-module-card strong {
  font-size: clamp(22px, 3vw, 34px);
}

.activity-detail-hero .activity-hero-actions {
  align-items: center;
}

@media (max-width: 980px) {
  .activity-module-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .activity-command-hero,
  .activity-phase-header,
  .activity-workbench--dashboard {
    grid-template-columns: 1fr;
  }

  .activity-module-wall {
    grid-template-columns: 1fr;
  }

  .activity-module-wall .activity-module-card.is-wide {
    grid-column: auto;
  }

  .stage-timeline {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
  }

  .stage-timeline-item {
    flex: 0 0 210px;
    scroll-snap-align: start;
  }

  .stage-timeline-item.stage-current,
  .stage-timeline-item.is-selected,
  .stage-timeline:has(.is-selected:not(.stage-current)) .stage-timeline-item.is-selected,
  .stage-timeline-item.stage-current:hover,
  .stage-timeline-item.is-selected:hover,
  .stage-timeline-item:hover,
  .stage-timeline-item:focus-visible {
    flex-grow: 0;
  }
}

.admin-tools > summary,
.chapter-upload-wrap > summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.admin-tool-grid {
  margin-top: 16px;
}

.admin-chapter-tools {
  display: grid;
  gap: 12px;
}

.course-watch-shell {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.course-player-panel,
.course-outline {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.course-player-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.course-player-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.course-player-head > div {
  min-width: 0;
}

.course-player-head h2 {
  margin: 8px 0 4px;
  color: var(--ink);
}

.course-player-head p {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.course-main-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 260px);
  min-height: 360px;
  border-radius: var(--radius-sm);
  background: #111827;
}

.course-progress {
  margin-top: 2px;
}

.course-empty {
  min-height: 420px;
  display: grid;
  place-items: center;
}

.course-outline {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 12px;
  width: 340px;
  min-width: 260px;
  max-height: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.course-outline-head {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 12px;
  border-bottom: 1px solid var(--line);
}

.course-outline-head strong {
  color: var(--ink);
}

.course-outline-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.course-chapter-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  overflow: visible;
}

.course-section-button strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.course-section-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
}

/* chapter tree (admin) */
.chapter-tree-list {
  display: grid;
  gap: 8px;
}

.chapter-upload-wrap {
  border: 1px solid #DDE5EC;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.chapter-upload-wrap[open] {
  border-color: #0F8F92;
  box-shadow: 0 0 0 3px rgba(15,143,146,0.08);
}

.chapter-upload-wrap summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: #F7F9FB;
  font-weight: 600;
}

.chapter-upload-wrap[open] summary {
  background: #E8F5F5;
  border-bottom: 1px solid #DDE5EC;
}

.chapter-upload-wrap summary::-webkit-details-marker {
  display: none;
}

.chapter-upload-wrap .chapter-num {
  font-size: 11px;
  font-weight: 700;
  color: #667085;
  background: #EDF1F5;
  padding: 2px 8px;
  border-radius: 4px;
}

.chapter-upload-wrap[open] .chapter-num {
  background: #0F8F92;
  color: #fff;
}

.chapter-upload-wrap summary strong {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
}

.chapter-upload-wrap summary small {
  color: var(--muted);
  font-size: 12px;
  flex: 0 0 auto;
}

.chapter-upload {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.chapter-upload .form-grid {
  margin-bottom: 4px;
}

.row-delete-form {
  padding: 0 16px 12px;
}

.tbl-compact {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.tbl-compact th,
.tbl-compact td {
  padding: 10px 12px;
  border-bottom: 1px solid #EDF1F5;
  text-align: left;
  font-size: 13px;
}

.tbl-compact thead th {
  background: #F4F7FA;
  font-weight: 700;
  font-size: 12px;
  color: #667085;
  border-bottom: 2px solid #DDE5EC;
}

.tbl-compact tbody tr:hover {
  background: #F9FBFC;
}

.tbl-compact tbody tr:last-child td {
  border-bottom: 0;
}

.course-chapter {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.course-chapter summary {
  cursor: pointer;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
}

.course-chapter summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.course-chapter summary strong {
  color: var(--ink);
}

.course-section-list {
  display: grid;
  gap: 6px;
  padding: 0 8px 10px;
}

.course-section-button {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.course-section-button:hover,
.course-section-button.active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.course-section-button span,
.course-section-button small {
  font-size: 12px;
  font-weight: 900;
}

.course-section-button span {
  color: var(--primary-dark);
}

.course-section-button strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-section-button small {
  color: var(--muted);
}

.lesson-delete-form {
  justify-content: flex-end;
  margin-top: -2px;
}

.lesson-video {
  width: 100%;
  max-height: 520px;
  border-radius: var(--radius-sm);
  background: #111827;
}

.lesson-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.lesson-progress span {
  display: block;
  min-width: 3px;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
}

.support-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}

.support-tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--text);
  font-weight: 900;
}

.support-tabs a:hover,
.support-tabs a:focus-visible,
.support-tabs a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.support-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.support-entry {
  min-height: 210px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, oklch(88% 0.045 190 / 0.5), transparent 32%),
    var(--surface-raised);
  color: var(--text);
}

.support-entry:hover,
.support-entry:focus-visible {
  border-color: var(--primary);
  color: var(--text);
}

.support-entry span,
.guide-card-head span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.support-entry strong {
  color: var(--ink);
  font-size: 22px;
}

.support-entry p {
  margin: 0;
  color: var(--text);
}

.support-entry small {
  color: var(--muted);
  font-weight: 900;
}

.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.teacher-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.teacher-avatar {
  width: 92px;
  height: 92px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--primary-soft);
}

.teacher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-avatar span {
  color: var(--primary-dark);
  font-size: 34px;
  font-weight: 900;
}

.teacher-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.teacher-main > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.teacher-main h2 {
  margin: 0;
  color: var(--ink);
}

.teacher-main p {
  margin: 0;
  color: var(--text);
}

.teacher-main textarea {
  min-height: 72px;
}

.teacher-private {
  display: grid;
  gap: 8px;
  margin: 0;
}

.teacher-private div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.teacher-private dt {
  color: var(--muted);
  font-weight: 900;
}

.teacher-private dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.teacher-admin-actions {
  align-items: center;
  justify-content: flex-start;
}

.button.danger {
  border-color: oklch(78% 0.08 24);
  background: var(--danger-soft);
  color: oklch(34% 0.11 24);
}

.button.danger:hover,
.button.danger:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
}

.status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
}

.status-pill.pending {
  background: var(--pending-soft);
  color: oklch(34% 0.08 80);
}

.status-pill.approved {
  background: var(--success-soft);
  color: oklch(32% 0.08 155);
}

.status-pill.rejected {
  background: var(--danger-soft);
  color: oklch(34% 0.11 24);
}

.status-pill.muted {
  color: var(--muted);
}

.competition-guide-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.competition-guide-nav {
  position: sticky;
  top: 18px;
  overflow: visible;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.competition-guide-nav details {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.competition-guide-nav details:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.competition-guide-nav summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}

.competition-guide-nav details div {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.competition-guide-nav a {
  display: block;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.competition-guide-nav a:hover,
.competition-guide-nav a:focus-visible,
.competition-guide-nav a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.guide-submit-panel {
  cursor: default;
}

.guide-submit-summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #0F8F92;
  list-style: none;
  padding: 4px 0;
}

.guide-submit-summary::-webkit-details-marker,
.fold-summary::-webkit-details-marker {
  display: none;
}

.guide-submit-panel[open] .guide-submit-summary {
  margin-bottom: 4px;
}

/* fold panel */
.fold-panel {
  cursor: default;
}

.fold-summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  color: #0F8F92;
  list-style: none;
  padding: 4px 0;
}

.fold-panel[open] .fold-summary {
  margin-bottom: 0;
}

.form-fieldset {
  border: 1px solid #DDE5EC;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.form-fieldset legend {
  font-size: 13px;
  font-weight: 700;
  color: #0F8F92;
  padding: 0 8px;
}

.form-fieldset label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.inline-details {
  position: relative;
}

.inline-details summary {
  list-style: none;
  cursor: pointer;
}

.inline-details summary::-webkit-details-marker {
  display: none;
}

.inline-details-menu {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border: 1px solid #DDE5EC;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,35,50,0.08);
  min-width: 120px;
}

.drive-capacity-panel {
  padding: 14px 20px !important;
}

.drive-capacity-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.competition-guide-main,
.guide-list {
  display: grid;
  gap: 14px;
}

.guide-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.guide-card h3 {
  margin: 0;
  color: var(--ink);
}

.guide-card p {
  margin: 0;
}

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

.guide-card-head small {
  color: var(--muted);
  font-weight: 800;
}

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

.guide-stage-grid div {
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.guide-stage-grid div.available {
  border-color: oklch(78% 0.05 155);
  background: var(--success-soft);
}

.guide-stage-grid div.muted {
  color: var(--muted);
}

.guide-stage-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.check-card {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 900;
}

.review-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.review-inline input {
  flex: 1 1 260px;
}

.mature-project-placeholder .support-overview {
  margin-top: 16px;
  margin-bottom: 0;
}

.honor-page {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  padding-bottom: 90px;
}

.honor-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgb(255 255 255 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.honor-hero,
.honor-stats,
.honor-streams,
.honor-timeline,
.honor-empty {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.honor-hero {
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.52fr);
  align-items: center;
  gap: 44px;
  padding: 70px 0 38px;
}

.honor-hero h1 {
  margin: 16px 0 18px;
  color: white;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

.honor-hero p {
  max-width: 680px;
  margin: 0;
  color: oklch(78% 0.038 220);
  font-size: 18px;
}

.honor-orbit {
  min-height: 340px;
  display: grid;
  place-items: center;
  position: relative;
}

.honor-orbit-ring {
  width: min(320px, 68vw);
  aspect-ratio: 1;
  border: 1px solid rgb(130 244 255 / 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgb(130 244 255 / 0.14), transparent 58%),
    conic-gradient(from 90deg, rgb(255 196 87 / 0.32), transparent 28%, rgb(130 244 255 / 0.42), transparent 68%);
  box-shadow: 0 0 80px rgb(45 225 194 / 0.16);
  animation: orbit-spin 20s linear infinite;
}

.honor-orbit-core {
  position: absolute;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid rgb(130 244 255 / 0.24);
  border-radius: 50%;
  background: rgb(6 18 32 / 0.72);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.28);
}

.honor-orbit-core strong {
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 42px;
}

.honor-orbit-core span {
  color: oklch(78% 0.04 220);
  font-size: 13px;
  font-weight: 900;
}

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

.honor-stats div {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.065);
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.18);
  backdrop-filter: blur(14px);
}

.honor-stats span {
  display: block;
  color: oklch(78% 0.04 220);
  font-size: 13px;
  font-weight: 900;
}

.honor-stats strong {
  display: block;
  margin-top: 8px;
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 34px;
}

.honor-streams {
  display: grid;
  gap: 22px;
  margin-bottom: 80px;
}

.honor-lane {
  overflow: hidden;
  border: 1px solid rgb(130 244 255 / 0.14);
  border-radius: 8px;
  background: rgb(6 18 32 / 0.48);
  box-shadow: 0 20px 48px rgb(0 0 0 / 0.18);
}

.honor-lane-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgb(130 244 255 / 0.12);
}

.honor-lane-head span {
  color: oklch(86% 0.1 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.honor-track {
  width: max-content;
  display: flex;
  gap: 14px;
  padding: 16px;
  animation: honor-scroll 21s linear infinite;
}

.honor-lane.reverse .honor-track {
  animation-direction: reverse;
}

.honor-lane:hover .honor-track {
  animation-play-state: paused;
}

.honor-card {
  width: 300px;
  min-height: 250px;
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: 138px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0.08), rgb(255 255 255 / 0.035)),
    rgb(6 18 32 / 0.72);
}

.honor-card-preview {
  overflow: hidden;
  border: 1px solid rgb(130 244 255 / 0.14);
  border-radius: 7px;
  background: rgb(255 255 255 / 0.08);
}

.honor-card-preview img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: white;
  pointer-events: none;
}

.honor-file-mark {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: oklch(86% 0.1 200);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 28px;
  font-weight: 900;
}

.honor-card span,
.honor-badge {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(130 244 255 / 0.12);
  color: oklch(86% 0.1 200);
  font-size: 12px;
  font-weight: 900;
}

.honor-card strong {
  display: block;
  margin: 9px 0 7px;
  color: white;
  line-height: 1.28;
}

.honor-card small {
  color: oklch(76% 0.038 220);
}

.honor-timeline {
  padding-bottom: 30px;
}

.honor-year {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  margin-top: 20px;
}

.honor-year-mark {
  position: sticky;
  top: 24px;
  height: fit-content;
  padding: 18px;
  border: 1px solid rgb(130 244 255 / 0.18);
  border-radius: 8px;
  background: rgb(6 18 32 / 0.68);
}

.honor-year-mark strong {
  display: block;
  color: white;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 38px;
}

.honor-year-mark span {
  color: oklch(78% 0.04 220);
  font-weight: 900;
}

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

.honor-timeline-card,
.honor-empty {
  border: 1px solid rgb(130 244 255 / 0.16);
  border-radius: 8px;
  background: rgb(255 255 255 / 0.065);
  backdrop-filter: blur(14px);
}

.honor-timeline-card {
  padding: 18px;
}

.honor-timeline-card h3 {
  margin: 12px 0 8px;
  color: white;
  font-size: 19px;
}

.honor-timeline-card p {
  margin: 0;
  color: oklch(78% 0.038 220);
}

.honor-timeline-card small {
  display: block;
  margin-top: 9px;
  color: oklch(72% 0.04 220);
}

.honor-empty {
  padding: 48px;
  text-align: center;
  color: oklch(78% 0.038 220);
}

.honor-empty h2 {
  color: white;
}

@keyframes honor-scroll {
  to {
    transform: translateX(-50%);
  }
}

.detail-card {
  max-width: 860px;
}

.detail-head {
  margin: 16px 0 18px;
}

.detail-content {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  white-space: pre-wrap;
}

.evaluation-row {
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
}

.evaluation-score {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.evaluation-score strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 24px;
  line-height: 1;
}

.evaluation-score span {
  margin-top: -10px;
  font-size: 12px;
  font-weight: 900;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(290px, 390px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.stack-column {
  display: grid;
  gap: 16px;
  align-items: start;
}

.stacked-head {
  margin-top: 26px;
}

.field-block.soft {
  background: color-mix(in oklch, var(--surface) 68%, white);
  border-color: color-mix(in oklch, var(--line) 76%, var(--accent));
}

.exam-time-grid {
  grid-template-columns: 1fr;
}

.exam-time-grid input[type="datetime-local"],
input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.compact-note {
  margin: 12px 0;
}

.target-picker-page {
  display: grid;
  gap: 18px;
}

.target-picker-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.target-picker-groups,
.target-picker-members {
  margin: 0;
}

.target-search-row {
  display: grid;
  grid-template-columns: auto minmax(220px, 340px);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.member-select-grid {
  max-height: min(62vh, 720px);
  overflow: auto;
  padding-right: 4px;
}

.task-center-layout {
  grid-template-columns: minmax(360px, 0.42fr) minmax(0, 1fr);
}

.evaluation-admin-layout {
  grid-template-columns: minmax(340px, 0.4fr) minmax(0, 1fr);
}

.content-admin-layout {
  grid-template-columns: minmax(340px, 0.38fr) minmax(0, 1fr);
}

.forum-layout {
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
}

.forum-page-layout,
.task-center-layout,
.evaluation-admin-layout,
.content-admin-layout {
  gap: 18px;
}

.forum-compose {
  position: sticky;
  top: 88px;
}

.forum-feed-panel,
.task-center-layout > .panel {
  min-height: 360px;
}

.online-exam-fields {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in oklch, var(--accent-soft) 45%, white);
  padding: 16px;
}

.exam-shell {
  display: grid;
  gap: 18px;
}

.exam-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in oklch, white 88%, var(--accent-soft));
  box-shadow: var(--shadow);
  padding: 18px 22px;
}

.exam-topbar h1 {
  margin: 6px 0;
  font-size: clamp(24px, 3vw, 38px);
}

.muted-link {
  color: var(--muted);
  font-weight: 700;
  text-decoration: none;
}

.exam-countdown {
  min-width: 220px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  padding: 14px 18px;
  text-align: right;
}

.exam-countdown span {
  display: block;
  color: color-mix(in oklch, white 70%, var(--accent));
  font-weight: 700;
}

.exam-countdown strong {
  display: block;
  margin-top: 4px;
  font-size: 32px;
  line-height: 1;
}

.exam-status-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.exam-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: 14px;
  color: var(--muted);
}

.exam-stage span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.exam-stage strong {
  color: var(--ink);
}

.exam-stage small {
  line-height: 1.35;
}

.exam-stage.active {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent-soft) 62%, white);
}

.exam-stage.active span {
  background: var(--accent);
  color: white;
}

.exam-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.28fr);
}

.exam-main-card,
.exam-side-card {
  align-self: start;
}

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

.exam-summary-grid > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px;
}

.exam-summary-grid span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.exam-summary-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

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

.exam-action-card {
  display: grid;
  gap: 6px;
  min-height: 138px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
}

.exam-action-card span,
.exam-action-card small {
  color: var(--muted);
  font-weight: 700;
}

.exam-action-card strong {
  font-size: 24px;
  overflow-wrap: anywhere;
}

.exam-action-card.available {
  border-color: var(--accent);
  background: color-mix(in oklch, var(--accent-soft) 55%, white);
}

.exam-action-card.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.exam-action-card.primary span,
.exam-action-card.primary small {
  color: color-mix(in oklch, white 82%, var(--accent-soft));
}

.exam-action-card.disabled {
  background: color-mix(in oklch, var(--surface) 78%, white);
  color: var(--muted);
  cursor: not-allowed;
}

.exam-shortcut-box {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.exam-shortcut-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.exam-shortcut-list li {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
}

.exam-shortcut-list span {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 900;
}

.exam-shortcut-list small {
  color: var(--muted);
  line-height: 1.45;
}

.pcb-measure-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
  gap: 16px;
  align-items: start;
}

.pcb-measure-control {
  position: sticky;
  top: 88px;
  min-height: min(760px, calc(100dvh - 110px));
  max-height: calc(100dvh - 110px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.pcb-measure-workspace {
  min-width: 0;
}

.pcb-measure-results {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.pcb-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.pcb-upload-button input {
  display: none;
}

.pcb-calibration-panel {
  margin-bottom: 14px;
}

.pcb-calibration-panel.is-collapsed {
  display: none;
}

.pcb-side-actions {
  display: grid;
  gap: 9px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.pcb-mode-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pcb-mode-row .button {
  min-height: 44px;
  padding: 8px 10px;
}

.pcb-control-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.pcb-control-row .check-row {
  min-height: 42px;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 8px 9px;
  font-weight: 850;
}

#measurePanel .pcb-control-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcb-side-actions .button.small {
  min-height: 42px;
}

.pcb-radius-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
}

.pcb-canvas-wrap {
  position: relative;
  overflow: auto;
  max-height: 72vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    linear-gradient(45deg, color-mix(in oklch, var(--surface) 80%, white) 25%, transparent 25%),
    linear-gradient(-45deg, color-mix(in oklch, var(--surface) 80%, white) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, color-mix(in oklch, var(--surface) 80%, white) 75%),
    linear-gradient(-45deg, transparent 75%, color-mix(in oklch, var(--surface) 80%, white) 75%);
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  padding: 12px;
}

.pcb-canvas-wrap .empty-inline {
  min-height: 140px;
  display: grid;
  place-items: center;
}

.pcb-measure-control .button.is-active {
  background: var(--ink);
  color: white;
  box-shadow: inset 0 0 0 2px color-mix(in oklch, white 24%, var(--ink));
  transform: translateY(1px);
}

.pcb-canvas-wrap canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  background: white;
  box-shadow: var(--shadow);
  cursor: crosshair;
}

.pcb-canvas-wrap .pcb-magnifier {
  position: absolute;
  z-index: 5;
  width: 168px;
  height: 168px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: white;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .22);
  pointer-events: none;
}

.pcb-precision-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding-top: max(80px, env(safe-area-inset-top));
  background: rgba(15, 23, 42, .42);
  pointer-events: none;
}

.pcb-precision-overlay[hidden] {
  display: none;
}

.pcb-precision-overlay > div {
  width: min(520px, calc(100vw - 32px));
  border: 1px solid color-mix(in oklch, var(--accent) 46%, white);
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  padding: 14px 16px;
  color: var(--ink);
}

.pcb-precision-overlay strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.pcb-precision-overlay span {
  color: var(--muted);
  line-height: 1.55;
}

body.pcb-precision-arming .pcb-measure-shell {
  filter: grayscale(.8);
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.code-preview {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 12px;
  color: var(--ink);
}

.pcb-review-panel {
  margin-top: 18px;
}

.pcb-review-messages {
  display: grid;
  gap: 12px;
  max-height: 560px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.65);
}

.pcb-review-message {
  max-width: 86%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.pcb-review-message.user {
  justify-self: end;
  background: #dff4f4;
  border-color: #8ccfd0;
}

.pcb-review-message.assistant {
  justify-self: start;
}

.pcb-review-message .meta {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 800;
}

.pcb-review-message .body {
  line-height: 1.72;
  word-break: break-word;
}

.pcb-review-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.pcb-review-composer textarea {
  resize: vertical;
}

@media (max-width: 760px) {
  .pcb-review-message {
    max-width: 100%;
  }

  .pcb-review-composer {
    grid-template-columns: 1fr;
  }
}

.measurement-list {
  display: grid;
  gap: 10px;
  align-content: start;
  overflow: auto;
  padding-right: 4px;
  min-height: 0;
}

.measurement-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-left: 6px solid var(--row-color);
  border-radius: 12px;
  background: white;
  padding: 10px;
}

.measurement-row strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--row-color);
  color: white;
}

.measurement-row span {
  font-weight: 900;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.measurement-row small {
  grid-column: 2;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.exam-lock {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: color-mix(in oklch, var(--ink) 72%, transparent);
  padding: 20px;
}

.exam-lock[hidden] {
  display: none;
}

.exam-lock > div {
  max-width: 460px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow);
  padding: 26px;
  text-align: center;
}

.exam-lock strong {
  display: block;
  font-size: 28px;
}

.post-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.post-type-tabs label {
  cursor: pointer;
}

.post-type-tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.post-type-tabs span {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  font-weight: 900;
}

.post-type-tabs input:checked + span {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.bug-fields[hidden] {
  display: none;
}

.form-hint {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
}

.forum-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 16px;
}

.forum-filter-bar a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.forum-filter-bar a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.forum-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.post-title-line,
.post-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.post-title-line a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.post-attachment-grid {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.post-attachment {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.post-attachment figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.post-screenshot,
.post-video-preview {
  width: 100%;
  max-height: 520px;
  border-radius: calc(var(--radius) - 2px);
  background: #101828;
  object-fit: contain;
}

.reply-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.post p:last-child {
  white-space: pre-wrap;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-inline {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.flash-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash,
.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--text);
}

.notice,
.flash.warning {
  border-color: oklch(78% 0.08 80);
  background: var(--pending-soft);
  color: oklch(34% 0.08 80);
}

.notice strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.notice p {
  margin: 4px 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.notice-success {
  border-color: rgba(15,143,146,0.25);
  background: #E8F5F5;
  color: #0C7A7D;
}

.notice-warning {
  border-color: rgba(217,76,76,0.25);
  background: #FDECEC;
  color: #B84040;
}

.notice-info {
  border-color: #DDE5EC;
  background: #F7F9FB;
  color: var(--text);
}

.info-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 6px;
  background: #E8F5F5;
  color: #0F8F92;
  font-weight: 700;
  font-size: 13px;
}

.readonly-field {
  background: #F4F7FA !important;
  color: #667085 !important;
  cursor: default;
}

.flash.success {
  border-color: oklch(76% 0.07 155);
  background: var(--success-soft);
  color: oklch(32% 0.08 155);
}

.flash.danger {
  border-color: oklch(78% 0.08 24);
  background: var(--danger-soft);
  color: oklch(34% 0.11 24);
}

.flash.info {
  border-color: oklch(78% 0.05 205);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .brand strong {
    font-size: 15px;
  }

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

  .account-card {
    margin-top: 0;
    padding: 10px 12px;
  }

  .workspace,
  .public-page {
    width: min(100% - 20px, 1120px);
    padding-top: 20px;
  }

  .login-stage,
  .home-dash,
  .stats-grid,
  .training-metrics,
  .quick-bento,
  .data-strip,
  .form-grid,
  .layout-two,
  .training-detail-grid,
  .drive-layout,
  .drive-upload,
  .drive-row,
  .task-row,
  .certificate-row,
  .evaluation-row,
  .course-watch-shell,
  .competition-guide-layout,
  .guide-stage-grid,
  .target-picker-grid,
  .target-search-row,
  .pcb-measure-shell,
  .measurement-row {
    grid-template-columns: 1fr;
  }

  .pcb-measure-control {
    position: static;
    min-height: 0;
    max-height: none;
  }

  .pcb-measure-results {
    grid-column: auto;
  }

  .measurement-list {
    max-height: 360px;
  }

  .pcb-control-row {
    grid-template-columns: 1fr;
  }

  .measurement-row small {
    grid-column: auto;
  }

  .home-left-col,
  .home-timetable-card,
  .home-side-stack {
    grid-column: auto;
    grid-row: auto;
  }

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

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

  .quick-bento-lg,
  .quick-bento-sm {
    grid-column: span 1;
  }

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

  .desktop-table {
    display: none;
  }

  .mobile-cards {
    display: grid;
  }

  .forum-compose {
    position: static;
  }

  .login-stage {
    gap: 24px;
  }

  .role-strip {
    grid-template-columns: 1fr;
  }

  .certificate-preview {
    width: 100%;
    height: 210px;
  }

  .drive-quota-number {
    justify-items: start;
  }

  .drive-folders {
    position: static;
  }

  .course-outline {
    position: static;
    max-height: none;
  }

  .competition-guide-nav {
    position: static;
    max-height: 360px;
  }

  .member-archive-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .archive-identity {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .member-avatar {
    width: 96px;
    border-radius: var(--radius);
  }

  .member-avatar span {
    font-size: 40px;
  }

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

  .teacher-card {
    grid-template-columns: 1fr;
  }

  .course-main-video {
    min-height: 240px;
    max-height: none;
  }

  .course-player-head {
    display: grid;
  }

  .course-section-button strong {
    white-space: normal;
  }

  .task-center-layout,
  .forum-page-layout {
    gap: 14px;
  }

  .exam-topbar,
  .exam-layout,
  .exam-action-grid,
  .exam-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .exam-countdown {
    min-width: 0;
    text-align: left;
  }

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

  .exam-action-card {
    min-height: 116px;
  }

  .task-row,
  .forum-row {
    align-items: stretch;
  }

  .task-row .row-actions,
  .forum-row .inline-form {
    justify-content: flex-start;
  }

  .filter-bar {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-band,
  .section-head,
  .public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-primary,
  .nav-group {
    min-width: min(150px, 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
  }

  .nav-primary {
    min-height: 40px;
  }

  .nav-group summary {
    min-height: 40px;
  }

  .nav-sub {
    padding: 0 8px 8px;
    border-left: 0;
  }

  .nav-sub a {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    font-size: 13px;
  }

  .intro-hero,
  .intro-api-panel {
    grid-template-columns: 1fr;
  }

  .honor-hero,
  .honor-year {
    grid-template-columns: 1fr;
  }

  .honor-stats,
  .honor-year-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro-hero {
    min-height: auto;
    gap: 28px;
    padding: 56px 0 72px;
  }

  .intro-orbit {
    min-height: 430px;
  }

  .intro-feature-grid,
  .intro-proof-grid,
  .intro-flow {
    grid-template-columns: 1fr;
  }

  .intro-course-band {
    grid-template-columns: 1fr;
  }

  .intro-honor-orbit {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .intro-honor-orbit::before,
  .intro-honor-core {
    display: none;
  }

  .intro-honor-card {
    position: relative;
    width: 100%;
    transform: none !important;
    animation: none;
  }

  .node-1 { transform: translate(-96px, -144px); }
  .node-2 { transform: translate(112px, -108px); }
  .node-3 { transform: translate(110px, 128px); }
  .node-4 { transform: translate(-118px, 104px); }
}

@media (max-width: 540px) {
  .sidebar {
    padding: 12px;
  }

  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .nav-primary,
  .nav-group {
    flex: 0 0 142px;
    scroll-snap-align: start;
  }

  .nav a,
  .nav summary {
    font-size: 13px;
  }

  .nav-sub a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .grade-filter,
  .forum-filter-bar,
  .support-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .grade-filter a,
  .forum-filter-bar a,
  .support-tabs a {
    flex: 0 0 auto;
  }

  .public-page {
    width: min(100% - 24px, 1120px);
  }

  .public-header {
    padding: 14px 16px;
  }

  .panel,
  .hero-band,
  .auth-panel {
    padding: 18px;
  }

  .member-archive-hero {
    padding: 18px;
  }

  .archive-identity {
    grid-template-columns: 1fr;
  }

  .archive-quick-facts,
  .archive-summary-grid {
    grid-template-columns: 1fr;
  }

  .archive-back,
  .avatar-upload-form .button,
  .avatar-file-control {
    width: 100%;
  }

  .member-archive-brand {
    right: -88px;
    bottom: -28px;
    opacity: 0.72;
  }

  .archive-info-list div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .login-copy h1,
  .hero-band h1,
  .member-archive-hero h1,
  .panel h1 {
    font-size: 25px;
  }

  .hero-band {
    display: grid;
  }

  .hero-band > .button,
  .actions .button,
  .auth-panel .button,
  .auth-panel button,
  .reply-form .button,
  .reply-form button,
  .task-center-layout > .panel > .button,
  .forum-compose > .button {
    width: 100%;
  }

  .row-actions .button {
    width: auto;
  }

  .resource-card.course-card .row-actions {
    align-items: stretch;
  }

  .resource-card.course-card .row-actions .button,
  .resource-card.course-card .row-actions form,
  .resource-card.course-card .row-actions button {
    width: 100%;
  }

  .task-row .row-actions .button,
  .task-row .row-actions form,
  .task-row .row-actions button,
  .forum-row .inline-form,
  .forum-row .inline-form button,
  .post-attachment figcaption {
    width: 100%;
  }

  .post-attachment figcaption {
    align-items: flex-start;
    flex-direction: column;
  }

  .intro-hero,
  .intro-section,
  .honor-hero,
  .honor-stats,
  .honor-streams,
  .honor-timeline,
  .honor-empty {
    width: min(100% - 24px, 1180px);
  }

  .intro-hero h1 {
    font-size: 38px;
  }

  .intro-actions .button {
    width: 100%;
  }

  .intro-orbit {
    min-height: 360px;
  }

  .orbit-ring {
    width: min(310px, 80vw);
  }

  .orbit-core {
    width: 124px;
    height: 124px;
  }

  .orbit-node {
    width: 98px;
    min-height: 66px;
  }

  .quick-bento,
  .grade-group-grid,
  .quick-option-grid {
    grid-template-columns: 1fr;
  }

  .node-1 { transform: translate(-82px, -116px); }
  .node-2 { transform: translate(84px, -86px); }
  .node-3 { transform: translate(82px, 100px); }
  .node-4 { transform: translate(-88px, 82px); }

  .intro-api-panel dl div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .honor-stats,
  .honor-year-list {
    grid-template-columns: 1fr;
  }

  .honor-card {
    width: 250px;
  }

  .honor-hero h1 {
    font-size: 38px;
  }

  .activity-brand strong {
    font-size: 22px;
  }

  .activity-brand span {
    display: none;
  }

  .activity-topbar div a,
  .activity-user-meta {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
  }

  .competition-guide-nav {
    max-height: 220px;
  }

  .teacher-private div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .course-main-video {
    min-height: 190px;
  }

  .course-outline {
    padding: 10px;
  }

  .course-section-button {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .course-section-button small {
    grid-column: 2;
  }

  .sheet-fixed-grid {
    grid-template-columns: 1fr;
  }
}

.timetable-hero {
  align-items: end;
}

.timetable-sync-card code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--primary-dark);
  font-size: 12px;
}

.timetable-steps {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.timetable-steps li + li {
  margin-top: 6px;
}

.timetable-grid-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-raised);
}

.timetable-grid {
  min-width: 900px;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.timetable-grid th,
.timetable-grid td {
  min-width: 104px;
  height: 96px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.timetable-grid th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-muted);
  color: var(--ink);
  font-weight: 900;
}

.timetable-grid thead th {
  top: 0;
  z-index: 2;
  text-align: center;
}

.timetable-grid td {
  background: rgb(255 255 255 / 0.72);
}

.timetable-grid td.has-course {
  background: var(--primary-soft);
}

.timetable-grid .today-col {
  background: rgba(15,143,146,0.06) !important;
}

.week-nav-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.week-nav-form label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

.week-nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.week-nav-group input {
  width: 64px;
  height: 34px;
  padding: 0 6px;
  text-align: center;
  border: 1px solid #DDE5EC;
  border-radius: 6px;
  font-size: 14px;
}

.course-chip {
  display: grid;
  gap: 3px;
  padding: 7px;
  border: 1px solid rgb(37 99 235 / 0.14);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 18px rgb(15 23 42 / 0.08);
}

.course-chip + .course-chip {
  margin-top: 6px;
}

.course-chip strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-chip span,
.course-chip small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.timetable-admin-grid td {
  padding: 0;
}

.timetable-admin-grid td.is-free-heavy {
  background: var(--success-soft);
}

.timetable-admin-grid td.is-busy-heavy {
  background: var(--pending-soft);
}

.timetable-admin-grid td.is-heat-dark .slot-detail summary span,
.timetable-admin-grid td.is-heat-dark .slot-detail summary small {
  color: white;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.26);
}

.timetable-admin-options {
  align-items: end;
}

.check-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.check-pill input {
  width: 16px;
  height: 16px;
}

.slot-detail {
  min-height: 84px;
}

.slot-detail summary {
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.slot-detail summary::-webkit-details-marker {
  display: none;
}

.slot-detail summary span {
  color: var(--success);
  font-size: 18px;
  font-weight: 900;
}

.slot-detail summary small {
  color: var(--primary-dark);
  font-weight: 800;
}

.slot-detail-body {
  min-width: 280px;
  max-height: 360px;
  overflow: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: white;
}

.slot-detail-body strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--ink);
}

.slot-detail-body ul {
  margin: 0;
  padding-left: 18px;
}

.slot-detail-body li + li {
  margin-top: 5px;
}

.slot-detail-body small {
  display: block;
  color: var(--muted);
}

.timetable-import-log {
  display: grid;
  gap: 8px;
}

.timetable-import-log p {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.timetable-import-log p.success {
  background: var(--success-soft);
  color: var(--success);
}

.timetable-import-log p.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.procurement-member-layout {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
}

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

.procurement-admin-panel,
.procurement-table-panel {
  display: grid;
  gap: 18px;
}

.procurement-source-panel {
  display: grid;
  gap: 16px;
}

.procurement-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.procurement-platform-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.procurement-platform-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.procurement-platform-logo,
.procurement-shop-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.procurement-platform-logo {
  width: 48px;
  height: 48px;
  font-size: 22px;
}

.procurement-platform-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.procurement-platform-main p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.procurement-shortcut-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.procurement-shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink);
  text-decoration: none;
}

.procurement-shop-chip.system {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.procurement-shop-chip > a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.procurement-shop-chip strong {
  overflow: hidden;
  max-width: 170px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.procurement-shop-chip img,
.procurement-shop-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  font-size: 12px;
}

.button.tiny {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.procurement-shortcut-editor {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.procurement-shortcut-editor summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 900;
}

.procurement-shortcut-editor summary span {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.procurement-shortcut-editor form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.procurement-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.procurement-toolbar h2,
.procurement-toolbar p {
  margin: 0;
}

.procurement-toolbar p {
  margin-top: 6px;
  color: var(--muted);
}

.procurement-export-form {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.procurement-export-form label {
  min-width: 190px;
}

.procurement-month-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.procurement-month-tabs a,
.procurement-month-tabs span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.procurement-month-tabs a span,
.procurement-month-tabs span span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
}

.procurement-month-tabs .active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.procurement-month-tabs.compact {
  margin-bottom: 14px;
}

.procurement-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.procurement-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.procurement-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.procurement-admin-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 12px;
  align-items: start;
}

.procurement-project-card,
.procurement-summary-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.procurement-project-card summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 900;
}

.procurement-project-card h3,
.procurement-summary-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.procurement-project-card p,
.procurement-summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.procurement-project-create-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.procurement-summary-list p {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.procurement-summary-list span,
.procurement-project-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.procurement-summary-list b {
  color: var(--ink);
}

.procurement-batch-bar {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.procurement-batch-bar form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.procurement-batch-bar span {
  color: var(--muted);
  font-weight: 800;
}

.procurement-selected-summary {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
}

.procurement-check-col {
  width: 42px;
  min-width: 42px;
  text-align: center !important;
}

.procurement-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: separate;
  border-spacing: 0;
}

.procurement-table th,
.procurement-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.procurement-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.procurement-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.procurement-item-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  min-width: 360px;
}

.procurement-item-cell strong,
.procurement-title-line strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.procurement-item-cell p,
.procurement-card p {
  margin: 8px 0;
  color: var(--text);
  line-height: 1.6;
}

.procurement-thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-muted);
}

.procurement-review-form {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: start;
  min-width: 420px;
}

.procurement-review-form textarea {
  min-height: 42px;
  resize: vertical;
}

.procurement-delete-form {
  margin-top: 8px;
}

.procurement-delete-form .button {
  width: auto;
}

.procurement-export-state {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.procurement-export-state.exported {
  background: var(--success-soft);
  color: var(--success);
}

.procurement-card-list {
  display: grid;
  gap: 12px;
}

.procurement-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.procurement-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.procurement-feedback {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--pending-soft);
  color: var(--pending);
  font-weight: 800;
}

.procurement-import-form {
  display: grid;
  gap: 14px;
}

.procurement-import-preview {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
}

.procurement-import-preview img {
  width: 108px;
  height: 108px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface);
}

.procurement-import-preview strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.45;
}

.procurement-import-empty {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 640px) {
  .exam-status-panel {
    grid-template-columns: 1fr;
  }

  .exam-countdown strong {
    font-size: 26px;
  }

  .procurement-member-layout,
  .procurement-toolbar,
  .procurement-filter-grid,
  .procurement-admin-compact-row,
  .procurement-project-create-row {
    grid-template-columns: 1fr;
  }

  .procurement-platform-main {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .procurement-platform-main .button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .procurement-platform-logo {
    width: 42px;
    height: 42px;
  }

  .procurement-export-form,
  .procurement-filter-actions {
    justify-content: stretch;
  }

  .procurement-export-form label,
  .procurement-export-form .button,
  .procurement-filter-actions .button {
    width: 100%;
  }

  .procurement-table {
    min-width: 0;
  }

  .procurement-table thead {
    display: none;
  }

  .procurement-table,
  .procurement-table tbody,
  .procurement-table tr,
  .procurement-table td {
    display: block;
    width: 100%;
  }

  .procurement-table tr {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
  }

  .procurement-table td {
    border-bottom: 0;
  }

  .procurement-item-cell,
  .procurement-card,
  .procurement-review-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .procurement-thumb {
    width: 96px;
    height: 96px;
  }

  .procurement-import-preview {
    grid-template-columns: 1fr;
  }

  .procurement-import-preview img {
    width: 100%;
    height: auto;
    max-height: 240px;
  }

  .procurement-batch-bar {
    justify-content: stretch;
  }

  .procurement-batch-bar form,
  .procurement-batch-bar .button {
    width: 100%;
  }
}

/* ==========================================
   Permission Admin Page — 矩阵表格布局
   ========================================== */

.permission-page {
  --page-bg: #F4F7FA;
  --surface: #FFFFFF;
  --surface-soft: #F7F9FB;
  --border: #DDE5EC;
  --text-primary: #172033;
  --text-secondary: #667085;
  --accent: #0F8F92;
  --accent-soft: #E8F5F5;
  --danger: #D94C4C;
  --danger-soft: #FDECEC;
}

/* ---- page headings ---- */
.permission-page .section-head h1 {
  font-size: 24px; font-weight: 700; color: var(--text-primary);
}
.permission-page .section-head h2 {
  font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0 0 4px;
}
.permission-page .section-head p {
  color: var(--text-secondary); font-size: 13px; margin: 0;
}

/* ==========================================
   Matrix Table — 权限矩阵
   ========================================== */
.matrix-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -24px;
  padding: 0 24px;
}

.perm-matrix {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.perm-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #F0F4F8;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  padding: 10px 6px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.perm-matrix thead th:first-child,
.perm-matrix thead th:nth-child(2),
.perm-matrix thead th:nth-child(3) {
  text-align: left;
  padding: 10px 10px;
}

.perm-matrix .col-id { width: 38px; text-align: center; }
.perm-matrix .col-name { min-width: 140px; }
.perm-matrix .col-toggle { width: 52px; text-align: center; }
.perm-matrix .col-perm { width: 46px; text-align: center; padding: 4px 2px; }
.perm-matrix .col-act { min-width: 90px; text-align: right; padding-right: 10px; white-space: nowrap; }
.perm-matrix .col-user { min-width: 100px; }
.perm-matrix .col-info { min-width: 100px; }
.perm-matrix .col-role { min-width: 72px; }

.perm-matrix thead .col-perm span {
  display: block;
  writing-mode: horizontal-tb;
  font-size: 11px;
  line-height: 1.3;
  max-width: 60px;
  word-break: keep-all;
}

/* ---- body rows ---- */
.perm-matrix tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 140ms ease;
}
.perm-matrix tbody tr:hover {
  background: #F9FBFC;
}
.perm-matrix .row-muted {
  opacity: 0.5;
}
.perm-matrix .row-new {
  background: #FAFBFC;
}
.perm-matrix .row-new:hover {
  background: #F2F6F8;
}

.perm-matrix tbody td {
  padding: 8px 6px;
  vertical-align: middle;
}

/* ---- inline form (display:contents) ---- */
.matrix-form {
  display: contents;
}

/* ---- inputs inside table ---- */
.tbl-input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 140ms ease, background 140ms ease;
}
.tbl-input:hover {
  border-color: var(--border);
  background: var(--surface);
}
.tbl-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}

.tbl-select {
  height: 34px;
  padding: 0 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  min-width: 180px;
}
.tbl-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}

/* ---- toggle switch (compact) ---- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  vertical-align: middle;
}
.toggle-switch input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.toggle-switch .toggle-track {
  position: absolute; inset: 0;
  background: #CDD4DC; border-radius: 22px; cursor: pointer;
  transition: background 160ms ease;
}
.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}
.toggle-switch .toggle-track::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 160ms ease;
}
.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

/* ---- check cell ---- */
.check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-height: 32px;
}
.check-cell input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---- buttons in table ---- */
.perm-matrix .button.small {
  height: 30px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  transition: background 140ms ease;
  white-space: nowrap;
}
.perm-matrix .button.small:hover {
  background: #0C7A7D;
}
.perm-matrix .button.small.danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.perm-matrix .button.small.danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ---- new tag ---- */
.new-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
}

/* ---- description panel ---- */
.matrix-desc-panel {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}
.matrix-desc-panel summary {
  font-size: 14px; font-weight: 600; color: var(--text-secondary); cursor: pointer;
}
.desc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.desc-row {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface);
}
.desc-row strong {
  font-size: 14px; color: var(--text-primary);
}
.desc-row textarea {
  width: 100%; height: 64px; padding: 6px 8px;
  font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 5px;
  resize: vertical;
}
.desc-row textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}
.desc-row .button.small {
  align-self: flex-end;
}

/* ---- add-user form ---- */
.add-user-form {
  display: flex; align-items: center; gap: 8px;
}

/* ---- user matrix ---- */
.user-matrix .col-perm { width: auto; min-width: 52px; }
.user-matrix .col-act { min-width: 70px; }

.user-matrix tbody td.col-user strong {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
}

/* ---- badge ---- */
.badge-plain {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px; font-weight: 600;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

/* ---- empty ---- */
.empty-inline {
  padding: 32px 0; text-align: center; color: var(--text-secondary); font-size: 14px;
}

/* ---- create-user grid ---- */
.create-user-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.create-user-grid label {
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  display: flex; flex-direction: column; gap: 5px;
}
.create-user-grid input,
.create-user-grid select {
  width: 100%; height: 38px; padding: 0 10px;
  font-size: 14px; font-family: inherit;
  color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface);
  box-sizing: border-box;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.create-user-grid input:focus,
.create-user-grid select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}
.create-user-titles {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center;
  padding: 10px 0;
}
.create-user-titles .label-hint {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
}
.create-user-grid > .button {
  grid-column: 1 / -1;
  height: 38px;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 600;
  border: none; border-radius: 6px; cursor: pointer;
  font-family: inherit;
  transition: background 140ms ease;
}
.create-user-grid > .button:hover {
  background: #0C7A7D;
}

/* checkbox-line (compact) */
.checkbox-line {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  white-space: nowrap;
}
.checkbox-line input[type="checkbox"] {
  width: 15px; height: 15px; accent-color: var(--accent);
}
.checkbox-line strong {
  font-weight: 600; color: var(--text-primary);
}

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .desc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .create-user-grid { grid-template-columns: 1fr; }
  .perm-matrix { min-width: 720px; }
}

/* ==========================================
   QA Widget — 浮动问答助手
   ========================================== */
.qa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
}

/* ---- floating avatar button ---- */
.qa-avatar-btn {
  width: 180px;
  height: 180px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 160ms ease;
  padding: 0;
}

.qa-avatar-btn:hover {
  filter: drop-shadow(0 6px 16px rgba(15,143,146,0.25));
}

.qa-avatar-btn img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* ---- chat panel ---- */
.qa-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 680px;
  height: 620px;
  max-height: calc(100vh - 120px);
  border: 1px solid rgba(15,143,146,0.15);
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 40px rgba(15,35,50,0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- panel header ---- */
.qa-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15,143,146,0.1);
  background: rgba(232,245,245,0.6);
  flex: 0 0 auto;
}

.qa-panel-head strong {
  display: block;
  font-size: 15px;
  color: #0F8F92;
}

.qa-panel-head small {
  font-size: 11px;
  color: #667085;
}

.qa-close-btn {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}

.qa-close-btn:hover {
  background: rgba(0,0,0,0.06);
  color: #333;
}

.qa-body { display:flex; flex:1 1 auto; min-height:0; overflow:hidden; }
.qa-sidebar { width:160px; border-right:1px solid rgba(15,143,146,0.08); display:flex; flex-direction:column; overflow:hidden; flex:0 0 auto; }
.qa-new-chat-btn { margin:8px; height:32px; border:1px dashed #0F8F92; border-radius:6px; background:transparent; color:#0F8F92; font-size:12px; font-weight:600; cursor:pointer; flex:0 0 auto; }
.qa-new-chat-btn:hover { background:#E8F5F5; }
.qa-conv-list { flex:1 1 auto; overflow-y:auto; padding:4px 6px; display:flex; flex-direction:column; gap:2px; }
.qa-conv-item { padding:7px 8px; border-radius:6px; cursor:pointer; font-size:12px; color:#333; border:1px solid transparent; }
.qa-conv-item:hover { background:#F4F7FA; }
.qa-conv-item.active { background:#E8F5F5; border-color:#0F8F92; font-weight:600; }
.qa-conv-item { display:flex; align-items:center; justify-content:space-between; }
.qa-conv-title { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.qa-conv-del { flex:0 0 auto; width:20px; height:20px; border:none; background:transparent; color:#ccc; font-size:14px; cursor:pointer; border-radius:4px; display:none; padding:0; line-height:1; }
.qa-conv-item:hover .qa-conv-del { display:block; }
.qa-conv-del:hover { background:#FDECEC; color:#D94C4C; }
.qa-main { flex:1 1 auto; display:flex; flex-direction:column; min-width:0; overflow:hidden; }

/* ---- messages area ---- */
.qa-messages-wrap {
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
}

.qa-messages-fade {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 2;
  background: linear-gradient(to bottom, rgba(255,255,255,0.92) 0%, transparent 100%);
  pointer-events: none;
}

.qa-messages {
  height: 100%;
  overflow-y: auto;
  padding: 14px 14px 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.qa-messages::-webkit-scrollbar {
  width: 4px;
}

.qa-messages::-webkit-scrollbar-thumb {
  background: rgba(15,143,146,0.15);
  border-radius: 999px;
}

/* ---- message bubbles ---- */
.qa-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
  animation: qaMsgIn 240ms ease both;
}

.qa-msg-bot {
  align-self: flex-start;
  background: #E8F5F5;
  color: #172033;
  border-bottom-left-radius: 4px;
}

.qa-msg-user {
  align-self: flex-end;
  background: #0F8F92;
  color: #fff;
  border-bottom-right-radius: 4px;
}

@keyframes qaMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* typing indicator */
.qa-typing {
  align-self: flex-start;
  padding: 10px 14px;
}

.qa-typing span {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0F8F92;
  animation: qaDot 1.4s infinite both;
  margin: 0 2px;
}

.qa-typing span:nth-child(2) { animation-delay: 0.2s; }
.qa-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes qaDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ---- input row ---- */
.qa-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px 0;
  flex: 0 0 auto;
}

.qa-tool-btn {
  width: 28px; height: 28px;
  border: 1px solid #DDE5EC;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 140ms ease, opacity 140ms ease;
}

.qa-tool-btn:hover {
  background: #F4F7FA;
}

.qa-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid rgba(15,143,146,0.08);
  flex: 0 0 auto;
}

.qa-input {
  flex: 1 1 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(15,143,146,0.2);
  border-radius: 12px;
  font-size: 13px;
  font-family: inherit;
  background: rgba(255,255,255,0.8);
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color 140ms ease, box-shadow 140ms ease;
  line-height: 1.5;
}

.qa-input:focus {
  border-color: #0F8F92;
  box-shadow: 0 0 0 3px rgba(15,143,146,0.08);
}

.qa-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #0F8F92;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, transform 140ms ease;
  flex: 0 0 auto;
}

.qa-send-btn:hover {
  background: #0C7A7D;
  transform: scale(1.05);
}

.qa-send-btn:disabled {
  background: #CDD4DC;
  cursor: default;
  transform: none;
}

/* ---- responsive ---- */
@media (max-width: 720px) {
  .qa-widget {
    right: 12px;
    bottom: 12px;
  }
  .qa-avatar-btn {
    width: 96px;
    height: 96px;
  }
  .qa-avatar-btn img {
    width: 92px;
    height: 92px;
  }
  .qa-panel {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 96px;
    width: auto;
    height: min(620px, calc(100vh - 124px));
    max-height: calc(100vh - 124px);
  }
  .qa-sidebar {
    width: 118px;
  }
  .qa-msg {
    max-width: 92%;
  }
}

@media (max-width: 480px) {
  .qa-panel {
    left: 8px;
    right: 8px;
    bottom: 88px;
    width: auto;
    height: min(540px, calc(100vh - 108px));
    border-radius: 14px;
  }
  .qa-sidebar {
    display: none;
  }
  .qa-panel-head {
    padding: 10px 12px;
  }
  .qa-messages {
    padding: 12px 10px 4px;
  }
  .qa-input-row {
    padding: 8px 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qa-msg {
    animation: none;
  }
  .qa-avatar-btn,
  .qa-send-btn,
  .qa-tool-btn {
    transition: none;
  }
}

.qa-config-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.qa-config-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.qa-config-form input,
.qa-config-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #DDE5EC;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.qa-config-form input:focus,
.qa-config-form textarea:focus {
  outline: none;
  border-color: #0F8F92;
  box-shadow: 0 0 0 3px rgba(15,143,146,0.1);
}

.qa-config-form small {
  color: var(--muted);
  font-size: 12px;
}

.serial-layout { display:grid; grid-template-columns:minmax(250px,310px) minmax(0,1fr); gap:20px; align-items:start; }
.serial-config-panel,.serial-terminal-panel { display:grid; gap:14px; }
.compact-head h2,.serial-terminal-head h2 { margin:0 0 4px; font-size:18px; }
.compact-head p,.serial-terminal-head p,.serial-security-note,.serial-form-hint { margin:0; color:var(--muted); font-size:13px; line-height:1.55; }
.serial-connect-actions,.serial-terminal-head,.serial-send-options { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.serial-terminal-head { justify-content:space-between; align-items:flex-start; }
.serial-terminal { min-height:360px; max-height:58vh; overflow:auto; padding:12px; border:1px solid oklch(29% 0.032 245); border-radius:var(--radius-sm); background:oklch(20% 0.028 245); color:oklch(93% 0.014 220); font:13px/1.6 ui-monospace,SFMono-Regular,Consolas,monospace; }
.serial-terminal-empty { display:grid; min-height:332px; place-items:center; color:oklch(72% 0.025 225); text-align:center; }
.serial-line { display:grid; grid-template-columns:96px minmax(0,1fr); gap:10px; padding:6px 0; border-bottom:1px solid rgb(255 255 255 / .08); }
.serial-line:last-child { border-bottom:0; }
.serial-line-meta { color:oklch(72% 0.025 225); font-size:12px; }
.serial-line.tx .serial-line-meta { color:oklch(76% 0.09 205); }
.serial-line.system .serial-line-meta { color:oklch(78% 0.1 85); }
.serial-line code { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; }
.serial-send-form { display:grid; gap:10px; padding-top:14px; border-top:1px solid var(--line); }
.serial-send-input { margin:0; }
.serial-send-input textarea { min-height:86px; resize:vertical; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.serial-send-options { justify-content:flex-end; }
.serial-send-options > label:not(.check-row) { display:inline-flex; align-items:center; gap:6px; margin:0; font-size:13px; font-weight:800; }
.serial-send-options select { min-height:36px; padding:6px 8px; }
@media (max-width:860px) { .serial-layout{grid-template-columns:1fr;} .serial-config-panel{grid-template-columns:repeat(2,minmax(0,1fr));} .serial-config-panel .section-head,.serial-config-panel .serial-connect-actions,.serial-config-panel .serial-security-note{grid-column:1/-1;} }
@media (max-width:560px) { .serial-config-panel{grid-template-columns:1fr;} .serial-terminal{min-height:300px;} .serial-line{grid-template-columns:1fr;gap:2px;} .serial-send-options{justify-content:flex-start;} }

.mouse-tool-intro,
.mouse-tool-license {
  display: grid;
  gap: 12px;
}

.mouse-tool-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.mouse-tool-tips span::before {
  content: "•";
  margin-right: 6px;
  color: var(--primary);
}

.mouse-tool-tips a {
  font-weight: 800;
}

.mouse-tool-frame-shell {
  overflow: hidden;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: oklch(97% 0.006 220);
}

.mouse-tool-frame {
  display: block;
  width: 100%;
  min-height: 760px;
  border: 0;
  background: oklch(97% 0.006 220);
}

.mouse-tool-license {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 700px) {
  .mouse-tool-frame-shell,
  .mouse-tool-frame {
    min-height: 680px;
  }
}
