@import url("/styles/admin.css");
:root {
  --ink: #173a3c;
  --muted: #718080;
  --line: #dfe6e3;
  --paper: #fbfcfa;
  --green: #1e5954;
  --mint: #e6efea;
  --red: #b75960;
  --serif: Georgia, "Times New Roman", serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  font:
    14px/1.55 "Segoe UI",
    Arial,
    sans-serif;
  background: var(--paper);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #36897c;
}
button {
  border: 0;
  background: transparent;
}
input[type="range"] {
  accent-color: var(--green);
  cursor: pointer;
  width: 100%;
  height: 4px;
}
input[type="checkbox"] {
  accent-color: var(--green);
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  gap: 40px;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -1px;
  position: relative;
  padding-right: 192px;
}
.brand img {
  margin-right: 10px;
}
.brand > span {
  color: #518477;
}
.brand small {
  position: absolute;
  left: 194px;
  width: 140px;
  letter-spacing: 1.5px;
  font-size: 8px;
  line-height: 1.8;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  font-weight: 500;
  color: var(--muted);
}
nav {
  display: flex;
  gap: 30px;
  height: 100%;
  align-items: center;
}
nav a,
nav button {
  text-decoration: none;
  font-size: 13px;
  color: #718080;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  padding: 0;
}
nav .active {
  color: var(--ink);
  font-weight: 600;
}
nav .active:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 3px;
  background: var(--green);
  left: 0;
  right: 0;
}
nav button span {
  margin-left: 9px;
}
.phase {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.2px;
  white-space: nowrap;
  color: var(--muted);
}
.phase i {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #a7b5ad;
  border-radius: 50%;
  margin: 0 10px;
}
.workspace {
  display: grid;
  grid-template-columns: 264px minmax(350px, 1fr) 330px;
  min-height: calc(100vh - 120px);
}
.sidebar {
  padding: 28px 20px 20px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.eyebrow {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #7c8a83;
}
h1 {
  font: normal 30px/1.18 var(--serif);
  letter-spacing: -0.8px;
  margin: 18px 0 12px;
}
h1 span {
  color: #6b8a7d;
}
.muted {
  color: var(--muted);
}
.intro {
  font-size: 12px;
  margin: 0 0 23px;
  max-width: 200px;
}
.search {
  display: flex;
  align-items: center;
  background: #f5f7f4;
  border: 1px solid #edf0eb;
  border-radius: 6px;
  padding: 8px 10px;
  gap: 6px;
}
.search > span {
  font-size: 23px;
  line-height: 1;
}
.search input {
  border: 0;
  background: transparent;
  min-width: 0;
  width: 100%;
  font-size: 11px;
  outline: 0;
}
.search kbd {
  font-size: 10px;
  color: #9ca9a1;
  border: 1px solid #dfe4df;
  padding: 0 4px;
  border-radius: 3px;
}
.section-label {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8b958c;
  font-weight: 650;
  margin: 25px 0 12px;
}
.model-card {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px;
  background: #f8f9f6;
  border: 1px solid #e8ece5;
  border-radius: 7px;
}
.model-icon {
  font-size: 27px;
  line-height: 1;
  color: #729284;
}
.model-card strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.model-card small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.tag {
  margin-left: auto;
  font-size: 9px;
  border: 1px solid #dae1d7;
  padding: 1px 5px;
  border-radius: 3px;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.count {
  font-size: 9px;
  color: #a2aaa2;
  margin-top: 10px;
}
.system-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 5px 0 10px;
}
.system-row strong {
  font-size: 11px;
  font-weight: 600;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.red {
  background: var(--red);
}
.bone {
  background: #b9b199;
}
.switch {
  margin-left: auto;
  width: 26px;
  height: 15px;
  position: relative;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 26px;
  height: 15px;
  margin: 0;
}
.switch span {
  display: block;
  background: #c9d1ca;
  width: 26px;
  height: 15px;
  border-radius: 10px;
  pointer-events: none;
}
.switch span:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  background: white;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  transition: 0.2s;
}
.switch input:checked + span {
  background: #467b68;
}
.switch input:checked + span:after {
  left: 13px;
}
.switch input:focus-visible + span {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}
.structure-list {
  padding: 0 0 10px 14px;
  border-left: 1px solid #e9eee9;
  margin: 0 0 15px 3px;
}
.structure-list button {
  display: flex;
  width: 100%;
  padding: 8px 9px;
  border-radius: 5px;
  text-align: left;
  align-items: center;
  font-size: 11px;
  color: #64776e;
  margin: 2px 0;
}
.structure-list button:before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #aebbb1;
  margin-right: 10px;
  flex-shrink: 0;
}
.structure-list button:hover {
  background: #f4f7f2;
}
.structure-list button.active {
  background: #eaf0e8;
  color: #244d41;
  font-weight: 600;
}
.structure-list button.active:before {
  background: #477b62;
}
.structure-list button.active:after {
  content: "›";
  margin-left: auto;
}
.sidebar-bottom {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding-top: 30px;
  align-items: flex-start;
}
.status-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: #859e7b;
  margin-top: 5px;
}
.sidebar-bottom strong {
  display: block;
  font-size: 10px;
  font-weight: 500;
}
.sidebar-bottom small {
  display: block;
  color: #9aa496;
  font-size: 9px;
  margin-top: 4px;
  max-width: 170px;
}
.viewport {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    ellipse at 48% 44%,
    #eff2e9 0%,
    #e7ede4 50%,
    #dfe7de 100%
  );
  min-height: 730px;
}
.viewport-top {
  position: absolute;
  z-index: 2;
  top: 27px;
  left: 28px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.viewport-top .eyebrow {
  font-size: 8px;
  color: #758878;
}
.viewport-top h2 {
  font-size: 14px;
  font-weight: 500;
  margin: 5px 0;
}
.view-pills {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  pointer-events: auto;
}
.pill {
  background: #ffffff80;
  border: 1px solid #ffffffa0;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 9px;
  color: #66806c;
}
.icon-button {
  background: #ffffff80;
  border: 1px solid #ffffffa0;
  border-radius: 5px;
  width: 29px;
  height: 29px;
  font-size: 19px;
}
.orientation {
  position: absolute;
  left: 28px;
  top: 109px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #92a08e;
  pointer-events: none;
}
.orientation > span:last-child {
  font-size: 9px;
  letter-spacing: 5px;
}
.orientation b {
  color: #5f8068;
  font-size: 23px;
  font-weight: 400;
  vertical-align: middle;
}
.selected-label {
  position: absolute;
  pointer-events: none;
  left: 64%;
  top: 39%;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #8d9b87;
  padding: 0 7px 7px 0;
}
.selected-label:before {
  content: "";
  position: absolute;
  width: 38px;
  height: 1px;
  background: #8d9b87;
  left: -36px;
  bottom: -1px;
  transform-origin: right;
  transform: rotate(-25deg);
}
.label-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ac5c5c;
}
.selected-label strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
  max-width: 150px;
}
.selected-label small {
  font-size: 9px;
  color: #7c8c7a;
  font-style: italic;
}
.view-tools {
  position: absolute;
  left: 21px;
  top: 43%;
  border: 1px solid #ffffffa0;
  display: flex;
  flex-direction: column;
  background: #fdfefbaf;
  border-radius: 8px;
  padding: 5px;
  gap: 4px;
  box-shadow: 0 5px 20px #334a3910;
}
.view-tools button {
  width: 32px;
  height: 32px;
  font-size: 22px;
  border-radius: 5px;
  line-height: 1;
}
.view-tools button.active {
  background: #d9e6d8;
  color: #386348;
}
.view-tools > span {
  height: 1px;
  background: var(--line);
  margin: 4px;
}
.slice-panel {
  position: absolute;
  left: 25px;
  bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.slice-panel label {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #7c8b78;
}
.slice-panel select {
  font-size: 10px;
  color: #4a6350;
  border: 1px solid #c8d3c3;
  border-radius: 4px;
  padding: 6px 20px 6px 8px;
  background: #f8fbf5c7;
  width: 145px;
}
.scale-panel {
  position: absolute;
  right: 24px;
  bottom: 88px;
  width: 170px;
}
.scale-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.scale-panel span {
  font-size: 8px;
  color: #7d8c77;
  letter-spacing: 1px;
}
.scale-panel strong {
  font-size: 17px;
  font-weight: 500;
  color: #46654a;
}
.scale-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}
.scale-ticks span {
  font-size: 8px;
  letter-spacing: 0;
}
.scale-panel small {
  font-size: 8px;
  color: #84917e;
  display: block;
  margin-top: 9px;
}
.viewport-bottom {
  position: absolute;
  bottom: 0;
  height: 60px;
  left: 0;
  right: 0;
  background: #edf2e8a0;
  border-top: 1px solid #cdd8c555;
  display: flex;
  align-items: center;
  padding: 0 24px;
  justify-content: space-between;
  gap: 10px;
}
.viewport-bottom > span {
  font-size: 8px;
  color: #82917d;
}
.separator {
  margin: 0 5px;
}
.voice-button {
  font-size: 10px;
  padding: 8px 12px;
  background: #fcfdf8;
  border: 1px solid #d3decc;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 4px #48623e08;
}
.voice-button > span {
  margin-right: 5px;
  color: #69906b;
}
.voice-button.listening {
  background: var(--green);
  color: white;
}
.voice-button.listening span {
  color: white;
}
#canvas-host {
  position: absolute;
  inset: 0;
}
#canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.details {
  background: #fff;
  border-left: 1px solid var(--line);
  padding: 29px 25px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  scrollbar-width: thin;
}
.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}
.index {
  font-size: 9px;
  color: #a0a99d;
  letter-spacing: 1px;
}
.card-title {
  font: 34px/1.1 var(--serif);
  letter-spacing: -0.6px;
  margin: 0 0 8px;
}
.latin-name {
  color: #91a08c;
  font: italic 14px var(--serif);
  margin-bottom: 15px;
}
.card-badge {
  font-size: 8px;
  padding: 4px 8px;
  background: #f5e9e8;
  color: #aa6868;
  border-radius: 4px;
  letter-spacing: 0.8px;
  display: inline-block;
}
.card-summary {
  font-size: 12px;
  color: #6e8074;
  margin: 19px 0 22px;
}
.card-section {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}
.card-section h3,
.card-section summary {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.5px;
  margin: 0 0 9px;
  cursor: pointer;
}
.card-section p,
.card-section li {
  font-size: 11px;
  color: #748174;
  line-height: 1.8;
  margin: 6px 0;
}
.card-section ul {
  padding-left: 16px;
}
.card-section a {
  color: #477c66;
}
.validation {
  font-size: 9px;
  color: #9b7f55;
  background: #fbf7ec;
  border: 1px solid #eee5cf;
  padding: 10px;
  border-radius: 5px;
  line-height: 1.7;
  margin: 15px 0;
}
.validation.validated {
  color: #3f735b;
  background: #eef5ee;
  border-color: #d1e4d2;
}
.relations {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.relations button {
  font-size: 9px;
  background: #f3f6f0;
  border: 1px solid #e4eade;
  padding: 5px 7px;
  border-radius: 4px;
}
.source-link {
  display: block;
  font-size: 9px;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.opacity-control {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 12px;
}
.opacity-control label {
  font-size: 9px;
  display: flex;
  justify-content: space-between;
  color: #7c8a77;
}
.opacity-control output {
  color: var(--ink);
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
  height: 38px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #9ba497;
  font-size: 8px;
  letter-spacing: 0.3px;
}
.footer i {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #8da17b;
  border-radius: 50%;
  margin-right: 5px;
}
.footer b {
  color: #c3cbc0;
  margin: 0 9px;
}
.toast {
  position: fixed;
  bottom: 55px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 20px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  z-index: 20;
  box-shadow: 0 8px 25px #173a3c30;
  max-width: 85vw;
  font-size: 12px;
}
.model-error {
  position: absolute;
  top: 35%;
  left: 20%;
  right: 20%;
  padding: 25px;
  background: #fff;
  border-radius: 8px;
  z-index: 5;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 35px;
  width: 500px;
  max-width: 92vw;
  color: var(--ink);
  box-shadow: 0 15px 80px #102d3033;
}
dialog::backdrop {
  background: #153d3c60;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font: 30px var(--serif);
  margin: 15px 0;
}
dialog p {
  font-size: 12px;
  color: var(--muted);
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 24px;
}
.tour-meta {
  display: flex;
  gap: 18px;
  font-size: 10px;
  margin: 23px 0;
  color: #6e8976;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.primary,
.secondary {
  padding: 11px 17px;
  border-radius: 6px;
  font-size: 12px;
  display: inline-block;
  text-decoration: none;
}
.primary {
  background: var(--green);
  color: white;
}
.secondary {
  background: var(--mint);
  color: var(--green);
  border: 1px solid #d5e2d8;
}
textarea {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  width: 100%;
  resize: vertical;
  margin: 8px 0 12px;
  color: var(--ink);
}
.tour-player {
  position: fixed;
  bottom: 55px;
  left: 290px;
  right: 355px;
  background: #fff;
  padding: 18px 22px;
  border: 1px solid #d3dfd1;
  border-radius: 10px;
  box-shadow: 0 8px 35px #203e3520;
  z-index: 10;
  display: flex;
  gap: 20px;
  align-items: center;
}
.tour-player h3 {
  margin: 4px 0;
  font: 20px var(--serif);
}
.tour-player p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0;
}
.player-controls {
  display: flex;
  gap: 5px;
  margin-left: auto;
  flex-shrink: 0;
}
.player-controls button {
  font-size: 12px;
  padding: 7px;
  background: #eef3ea;
  border-radius: 4px;
}
.tour-player progress {
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  width: calc(100% - 20px);
  height: 3px;
  accent-color: var(--green);
}
.workspace {
  height: calc(100dvh - 120px);
  min-height: 570px;
}
.viewport {
  min-height: 0;
}
.sidebar {
  overflow: auto;
  scrollbar-width: thin;
}
.details {
  max-height: none;
  height: 100%;
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: 290px minmax(450px, 1fr) 370px;
  }
  .sidebar {
    padding: 35px 28px;
  }
  .details {
    padding: 35px 30px;
  }
  .topbar {
    padding: 0 35px;
  }
}
@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 225px minmax(300px, 1fr) 285px;
  }
  .sidebar {
    padding: 25px 15px;
  }
  .details {
    padding: 25px 18px;
  }
  .topbar {
    gap: 20px;
    padding: 0 20px;
  }
  .brand {
    padding-right: 0;
  }
  .brand small {
    display: none;
  }
  nav {
    gap: 22px;
  }
  .viewport-bottom > span {
    max-width: 160px;
  }
  .view-pills .pill {
    display: none;
  }
  .tour-player {
    left: 245px;
    right: 305px;
  }
  .card-title {
    font-size: 29px;
  }
  .scale-panel {
    width: 130px;
  }
  .slice-panel {
    left: 15px;
  }
  .slice-panel select {
    width: 130px;
  }
  .viewport-top {
    left: 20px;
  }
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 210px 1fr;
    height: auto;
  }
  .details {
    grid-column: 1/-1;
    max-height: none;
    height: auto;
    border-top: 1px solid var(--line);
    padding: 25px 35px;
  }
  .viewport {
    min-height: 690px;
  }
  .topbar nav {
    margin-left: auto;
  }
  .phase {
    display: none;
  }
  .tour-player {
    left: 230px;
    right: 20px;
  }
  .footer > span:nth-child(2) {
    display: none;
  }
  .card-summary {
    max-width: 600px;
  }
  .card-section p {
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 67px;
    padding: 0 14px;
    gap: 10px;
  }
  .brand {
    font-size: 23px;
  }
  .brand img {
    width: 29px;
    height: 29px;
    margin-right: 6px;
  }
  nav {
    gap: 13px;
  }
  nav a,
  nav button {
    font-size: 10px;
  }
  nav button span {
    display: none;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .sidebar {
    padding: 17px;
    border-right: 0;
  }
  .sidebar h1,
  .sidebar .intro,
  .sidebar .eyebrow,
  .sidebar .section-label,
  .model-card,
  .section-heading,
  .sidebar-bottom,
  .system-row {
    display: none;
  }
  .sidebar .search {
    margin-bottom: 10px;
  }
  .structure-list {
    display: flex;
    overflow: auto;
    padding: 0;
    border: 0;
    margin: 0;
    gap: 5px;
  }
  .structure-list button {
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 10px;
    border: 1px solid #e7ede3;
  }
  .structure-list button:before {
    display: none;
  }
  .structure-list button.active:after {
    display: none;
  }
  .viewport {
    min-height: 640px;
  }
  .details {
    padding: 25px;
  }
  .viewport-bottom {
    padding: 0 15px;
  }
  .viewport-top h2 {
    font-size: 13px;
  }
  .selected-label {
    left: 60%;
  }
  .selected-label strong {
    max-width: 120px;
  }
  .view-tools {
    left: 12px;
  }
  .footer > span:last-child {
    display: none;
  }
  .footer {
    padding: 0 15px;
  }
  .tour-player {
    left: 12px;
    right: 12px;
    bottom: 48px;
    display: block;
    padding: 15px;
  }
  .player-controls {
    margin-top: 10px;
  }
  .scale-panel {
    right: 15px;
  }
  .sidebar #bone-list {
    display: none !important;
  }
}

.view-pills select {
  background: #ffffffbf;
  border: 1px solid #d5dfd2;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 10px;
  color: #49654e;
  max-width: 170px;
}
.model-loading {
  position: absolute;
  left: 20%;
  right: 20%;
  top: 42%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  font-size: 12px;
  pointer-events: none;
}
.model-loading small {
  font-size: 10px;
  color: #83947e;
}
.loading-ring {
  width: 28px;
  height: 28px;
  border: 2px solid #c1d0bc;
  border-top-color: #3f775c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-ring {
    animation: none;
  }
}

.scale-ticks button {
  font-size: 8px;
  color: #627d60;
  padding: 3px 0;
}
.scale-ticks button:hover {
  text-decoration: underline;
}
#tour-select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 100%;
  color: var(--green);
  background: #f6f9f2;
}
