:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #dbe3eb;
  --line-strong: #c5d0dc;
  --text: #1f2933;
  --muted: #667789;
  --brand: #1f7ae0;
  --brand-deep: #145fb2;
  --danger: #b42318;
  --success: #0f7b46;
  --warning: #a45f00;
  --shadow: 0 18px 50px rgba(31, 41, 51, 0.08);
  --radius: 8px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
}

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

code {
  background: #eef3f8;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}

.topbar {
  height: 60px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  background: #182433;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

nav {
  display: flex;
  gap: 6px;
}

nav a {
  color: rgba(255, 255, 255, 0.78);
  padding: 8px 12px;
  border-radius: 6px;
}

nav a.active,
nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.82);
}

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}

main.wide {
  max-width: none;
  padding: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

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

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

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

.overview-head h1 {
  font-size: 20px;
  margin-bottom: 4px;
}

.overview-head p {
  margin-bottom: 0;
}

.endpoint {
  min-width: 280px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.endpoint span {
  color: var(--muted);
  display: block;
  margin-bottom: 4px;
}

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

.module-overview {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
  overflow: hidden;
  background: linear-gradient(135deg, #eef6f8 0%, #f4f6ff 68%, #f6f7fb 100%);
}

.module-nav {
  background: linear-gradient(180deg, #142033 0%, #0c1727 100%);
  color: #d9e6f8;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 30px 22px;
  max-height: calc(100vh - 60px);
  overflow: auto;
}

.module-brand {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 0 4px 28px;
}

.module-brand-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #2f80ed, #15b89a);
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.module-brand strong {
  display: block;
  color: #fff;
  font-size: 22px;
}

.module-brand small {
  color: #9eb0c6;
  font-size: 14px;
}

.module-nav-title {
  color: #8799b0;
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px 16px;
}

.module-nav button {
  width: 100%;
  min-height: auto;
  border: 0;
  background: transparent;
  color: #d9e6f8;
  font: inherit;
  cursor: pointer;
}

.module-nav-group {
  display: grid;
  gap: 4px;
  padding: 4px 0 8px;
  border-bottom: 0;
}

.module-nav-group:last-child {
  border-bottom: 0;
}

.module-nav-primary,
.module-nav-children button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 10px;
}

.module-nav-primary {
  padding: 12px 14px;
  font-weight: 700;
  font-size: 16px;
}

.module-nav-primary:hover,
.module-nav-primary.active,
.module-nav-children button:hover,
.module-nav-children button.active {
  background: rgba(65, 119, 219, 0.28);
  color: #fff;
}

.module-nav-children {
  display: grid;
  gap: 2px;
}

.module-nav-children button {
  padding: 10px 14px 10px 54px;
  color: #9eb0c6;
  font-weight: 700;
}

.module-nav-children button.active {
  background: linear-gradient(90deg, #2f74ff 0%, rgba(47, 116, 255, 0.32) 100%);
  color: #fff;
  font-weight: 700;
}

.module-content {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 40px 42px;
  max-height: calc(100vh - 60px);
  overflow: auto;
  background: transparent;
}

.module-content-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.module-content-head h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.module-content-head p {
  color: #67758d;
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.refresh-button {
  width: 52px;
  height: 52px;
  min-height: 52px;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font-size: 26px;
  box-shadow: 0 10px 26px rgba(38, 55, 77, 0.08);
}

.module-search {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7e1ef;
  padding: 0 16px;
  min-height: 56px;
  max-width: 920px;
  box-shadow: 0 14px 36px rgba(38, 55, 77, 0.08);
}

.module-search span {
  color: #607086;
  font-size: 20px;
}

.module-search input {
  border: 0;
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  color: #172033;
}

.module-search input:focus {
  outline: 0;
}

.module-section {
  background: transparent;
  scroll-margin-top: 76px;
}

.module-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 0 0 4px;
}

.module-section-head h2 {
  margin: 0;
  font-size: 18px;
}

.module-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.module-group {
  padding: 0 0 12px;
  scroll-margin-top: 76px;
}

.module-group:last-child {
  border-bottom: 0;
}

.module-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.module-group-head h3 {
  margin: 0;
  font-size: 15px;
}

.module-group-head span {
  color: var(--muted);
  font-size: 12px;
}

.prototype-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.prototype-card {
  display: grid;
  gap: 14px;
  min-height: 188px;
  border: 1px solid rgba(215, 225, 239, 0.9);
  border-radius: 10px;
  background: #fff;
  padding: 20px 22px;
  color: var(--text);
  box-shadow: 0 14px 34px rgba(38, 55, 77, 0.06);
}

.prototype-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(31, 122, 224, 0.1);
}

.prototype-card-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.prototype-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #dbe4f0;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
}

.prototype-card-head > span:last-child {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.prototype-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  font-size: 18px;
}

.prototype-desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.prototype-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.prototype-card-meta {
  display: grid;
  gap: 8px;
  border-top: 1px solid #e6edf6;
  padding-top: 14px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.prototype-card-meta strong {
  display: inline-block;
  min-width: 72px;
  color: var(--muted);
  font-weight: 500;
}

.prototype-action {
  color: var(--brand);
  font-size: 13px;
  text-align: right;
}

.prototype-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prototype-tags span {
  border: 1px solid #d9e7ff;
  background: #f2f7ff;
  color: var(--brand);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.prototype-tags span:last-child {
  margin-left: auto;
  border-color: #f1d6ad;
  background: #fff7ed;
  color: #b76500;
  font-weight: 700;
}

.card,
.panel,
.auth-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.card-main {
  min-height: 88px;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #edf5ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  margin-bottom: 10px;
}

.card h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
}

.template-list {
  display: grid;
  gap: 12px;
}

.template-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
  overflow: hidden;
  background: linear-gradient(135deg, #eef6f8 0%, #f4f6ff 68%, #f6f7fb 100%);
}

.template-nav {
  padding: 30px 22px;
}

.template-nav .module-nav-primary {
  margin-bottom: 6px;
}

.template-content {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 40px 42px;
  max-height: calc(100vh - 60px);
  overflow: auto;
}

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

.template-content-head h1 {
  font-size: 30px;
  margin-bottom: 8px;
}

.template-content-head p {
  color: #67758d;
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.template-panel[hidden] {
  display: none;
}

.template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}

.template-card-main {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.template-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.template-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.meta-list.inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.modal-dialog {
  width: min(560px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
}

@media (max-width: 1100px) {
  .template-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .template-nav {
    padding: 24px 18px;
  }

  .template-content {
    padding: 30px 24px;
  }
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  gap: 8px;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 3px 0 0;
  font-weight: 700;
}

.panel {
  padding: 20px;
}

.auth-panel {
  max-width: 440px;
  margin: 70px auto;
  padding: 28px;
}

.two-column {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.form .check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.check-row input {
  width: auto;
}

.module-picker {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  gap: 12px;
}

.module-picker legend {
  color: var(--muted);
  font-weight: 700;
  padding: 0 6px;
}

.stack {
  display: grid;
  gap: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

textarea {
  resize: vertical;
}

button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--brand-deep);
  color: #fff;
}

.button.secondary,
button.secondary {
  background: #fff;
  color: var(--brand);
}

.button.secondary:hover,
button.secondary:hover {
  background: #edf5ff;
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
}

button.secondary-danger {
  background: #fff;
  color: var(--danger);
}

button.secondary-danger:hover {
  background: #fff1f0;
  color: var(--danger);
}

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

.danger-text:hover {
  color: #8f1d15;
}

.button.full {
  width: 100%;
}

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

button.ghost {
  min-height: 30px;
  border-color: rgba(255, 255, 255, 0.28);
  background: transparent;
  color: #fff;
}

.link-button {
  min-height: auto;
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  font-weight: 400;
}

.link-button:hover {
  background: transparent;
  color: var(--brand-deep);
}

.flash {
  border-radius: 6px;
  padding: 11px 13px;
  margin-bottom: 16px;
  border: 1px solid;
}

.flash.success {
  border-color: #a8d9bf;
  background: #edf9f2;
  color: var(--success);
}

.flash.error {
  border-color: #f0b7b2;
  background: #fff1f0;
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
}

.panel-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.panel-title-row h2 {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--panel-soft);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.actions form {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.table-actions form {
  display: inline-flex;
}

.table-action {
  min-height: 28px;
  border: 1px solid #d9e7ff;
  border-radius: 6px;
  background: #fff;
  color: var(--brand);
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.table-action:hover {
  background: #edf5ff;
  color: var(--brand-deep);
}

button.table-action {
  cursor: pointer;
}

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

.user-row-card {
  display: grid;
  grid-template-columns: 150px minmax(210px, 1.2fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(170px, 0.9fr) 64px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--panel-soft);
}

.user-identity strong,
.user-identity span {
  display: block;
}

.user-identity span:not(.status) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.inline-edit-form,
.user-setting {
  display: grid;
  gap: 7px;
}

.inline-edit-form label,
.user-setting > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.inline-edit-form input {
  margin: 0;
}

.setting-line {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.setting-line > span:not(.status) {
  color: var(--muted);
}

.compact-control {
  display: flex;
  gap: 6px;
  align-items: center;
}

.compact-control input {
  min-width: 0;
}

.user-row-actions {
  display: flex;
  justify-content: flex-end;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.project-edit-form {
  max-width: 560px;
}

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

.project-edit-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--panel-soft);
}

.project-edit-item strong,
.project-edit-item span {
  display: block;
}

.project-edit-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.project-edit-item .button {
  width: fit-content;
  margin-top: 8px;
}

.mini-input {
  width: 96px;
  padding: 5px 7px;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  background: #eef3f8;
  color: var(--muted);
}

.status.published {
  background: #eaf7ef;
  color: var(--success);
}

.status.pending {
  background: #fff4de;
  color: var(--warning);
}

.status.rejected {
  background: #fff1f0;
  color: var(--danger);
}

.status.archived {
  background: #eef1f4;
  color: #53606e;
}

.reason {
  color: var(--danger);
  font-size: 12px;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--panel-soft);
}

.review-card p {
  margin-bottom: 8px;
}

.notes {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1.6;
}

.review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-content: start;
}

.reject-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 82px;
  gap: 8px;
}

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-soft);
}

.empty.compact {
  padding: 16px;
}

.prototype-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  height: calc(100vh - 112px);
  min-height: 640px;
  gap: 14px;
}

.prototype-shell.annotation-shell {
  grid-template-columns: 260px minmax(0, 1fr) 340px;
  height: calc(100vh - 60px);
  min-height: 0;
  gap: 0;
  background: #eef3f8;
}

.prototype-shell aside {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.annotation-shell .prototype-sidebar {
  border-width: 0 1px 0 0;
  border-radius: 0;
  box-shadow: none;
  overflow: auto;
}

.viewer-actions {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.prototype-shell iframe {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.prototype-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #e8eef5;
}

.prototype-stage-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.prototype-stage-toolbar strong,
.prototype-stage-toolbar span {
  display: block;
}

.prototype-stage-toolbar span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.annotation-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.annotation-toolbar button,
.annotation-toolbar .button {
  min-height: 34px;
  padding: 6px 10px;
}

.annotation-toolbar button.active {
  border-color: #b76500;
  background: #b76500;
  color: #fff;
}

.prototype-frame-wrap {
  min-height: 0;
  padding: 12px;
}

.annotation-shell .prototype-frame-wrap iframe {
  border-radius: 6px;
  box-shadow: 0 14px 38px rgba(31, 41, 51, 0.12);
}

.annotation-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: #fff;
}

.annotation-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}

.annotation-panel-head h2 {
  margin: 0 0 4px;
}

.annotation-panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.annotation-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.annotation-filter input {
  width: auto;
}

.annotation-tip {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  background: var(--panel-soft);
}

.annotation-list {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.annotation-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.annotation-card.is-active {
  border-color: #b76500;
  box-shadow: 0 0 0 3px rgba(183, 101, 0, 0.12);
}

.annotation-card.is-resolved {
  background: #f6f8fa;
}

.annotation-card-top {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.annotation-jump {
  width: 28px;
  height: 28px;
  min-height: 28px;
  border-radius: 50%;
  padding: 0;
  font-size: 12px;
}

.annotation-card-top strong,
.annotation-card-top span {
  display: block;
}

.annotation-card-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.annotation-card-top span {
  color: var(--muted);
  font-size: 12px;
}

.annotation-status {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  background: #fff4de;
  color: var(--warning);
  white-space: nowrap;
}

.annotation-status.resolved {
  background: #eef1f4;
  color: #53606e;
}

.annotation-card p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}

.annotation-card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.annotation-empty {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-soft);
}

.annotation-composer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.34);
}

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

.annotation-composer-card {
  width: min(460px, calc(100vw - 40px));
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.annotation-composer-head,
.annotation-composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.annotation-composer-actions {
  justify-content: flex-end;
}

.annotation-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 110;
  max-width: min(360px, calc(100vw - 36px));
  border: 1px solid #a8d9bf;
  border-radius: 8px;
  background: #edf9f2;
  color: var(--success);
  padding: 11px 13px;
  box-shadow: var(--shadow);
}

.back {
  color: var(--muted);
}

.meta-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.branch-list {
  display: grid;
  gap: 6px;
}

.branch-list a {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--text);
}

.branch-list a.active,
.branch-list a:hover {
  border-color: var(--brand);
  background: #edf5ff;
  color: var(--brand);
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    height: auto;
    align-items: start;
    padding: 14px;
  }

  nav,
  .account,
  .page-head {
    flex-wrap: wrap;
  }

  .two-column,
  .review-card,
  .template-card,
  .prototype-shell {
    grid-template-columns: 1fr;
  }

  .prototype-shell.annotation-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .annotation-shell .prototype-sidebar,
  .annotation-panel {
    border: 0;
  }

  .annotation-panel {
    min-height: 360px;
  }

  .template-content,
  .module-content {
    max-height: none;
  }

  .user-row-card {
    grid-template-columns: 1fr;
  }

  .prototype-shell {
    height: auto;
  }

  .prototype-shell iframe {
    height: 72vh;
  }
}

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

  .template-nav,
  .template-content {
    max-height: none;
  }
}
