.project-dialog {
  position: fixed;
  inset: 3vh auto;
  margin: 0 auto;
  width: min(1120px, 94vw);
  max-height: 94vh;
  padding: 0;
  border: 1px solid #718979;
  border-radius: 18px;
  background: #f0ecdf;
  color: #203a35;
  box-shadow: 0 30px 100px #0009;
  font-family: Archivo, system-ui, sans-serif;
}
.project-dialog::backdrop {
  background: #0c181dc9;
}
.project-dialog > header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #173832;
  color: #f8efd7;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.project-dialog h2 {
  font-size: 30px;
  margin: 5px 0;
  font-family: 'Bodoni Moda', Georgia, serif;
}
.project-dialog small {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.project-dialog .btn {
  width: auto;
  font-size: 12px;
  padding: 11px 16px;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.project-dialog .btn.ghost {
  color: inherit;
  border: 1px solid #92a196;
  background: transparent;
}
.project-dialog .btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.project-dialog button:focus-visible,
.project-dialog select:focus-visible,
.project-dialog input:focus-visible,
.project-dialog textarea:focus-visible {
  outline: 3px solid #bd832a;
  outline-offset: 3px;
}
.project-body {
  padding: 24px 28px 36px;
}
.project-notice {
  margin: 0;
  padding: 0 28px;
  background: #f8e6b6;
  line-height: 1.6;
  white-space: pre-wrap;
}
.project-notice:not(:empty) {
  padding: 14px 28px;
}
.project-body p {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.project-caption {
  color: #61716a;
  font-size: 12px !important;
}
.project-progress {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  background: #dce4d9;
  padding: 18px;
  border-radius: 10px;
  margin: 10px 0 22px;
}
.project-progress progress {
  flex: 1;
  min-width: 150px;
  height: 12px;
  accent-color: #4c7f60;
}
.project-progress span {
  font-size: 12px;
}
.project-current {
  background: #fffaf0;
  border: 1px solid #d4d3bf;
  border-left: 4px solid #b5944e;
  border-radius: 8px;
  padding: 20px;
  margin: 18px 0;
}
.project-current h3 {
  margin: 8px 0;
}
.project-current button {
  margin: 8px 8px 0 0;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 22px 0;
}
.project-card {
  border: 1px solid #d3d3c5;
  border-top: 4px solid var(--place-color, #b79b60);
  background: #fffcf5;
  padding: 18px;
  border-radius: 9px;
  overflow: hidden;
  min-width: 0;
}
.project-card h3 {
  font-size: 17px;
  line-height: 1.4;
}
.project-card p {
  overflow-wrap: anywhere;
}
.project-card button {
  margin: 8px 5px 0 0;
}
.project-success {
  background: #cfdfc9;
  color: #294b34;
  padding: 14px;
  border-radius: 6px;
}
.project-feedback {
  background: #f4e2b2;
  padding: 10px;
}
.project-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
}
.project-toolbar a {
  color: #315e52;
}
.project-dialog details {
  padding: 14px;
  border: 1px solid #cccdbf;
  border-radius: 6px;
  margin: 10px 0;
}
.project-dialog summary {
  cursor: pointer;
  font-weight: 600;
}
.teacher-project > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  align-items: center;
}
.teacher-project table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.teacher-project td,
.teacher-project th {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #cbd2c8;
}
.project-dialog label {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
}
.project-dialog input:not([type='checkbox']):not([type='radio']),
.project-dialog textarea,
.project-dialog select {
  display: block;
  width: 100%;
  background: #fffdf7;
  border: 1px solid #a8b4a8;
  border-radius: 5px;
  padding: 10px;
  color: #233a34;
  margin: 6px 0 12px;
  font: inherit;
  box-sizing: border-box;
}
.project-dialog input[type='checkbox'],
.project-dialog input[type='radio'] {
  margin-right: 9px;
  accent-color: #3d6e53;
}
.project-dialog form > label {
  margin: 12px 0;
}
.project-dialog .activity-form {
  color: #203a35;
}
.project-dialog .activity-feedback {
  color: #203a35;
  background: #e0e9dc;
}
.project-hud {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  background: #173832ed;
  border: 1px solid #a0a98a;
  border-radius: 10px;
  color: #fff1ce;
  padding: 12px 16px;
  min-width: 260px;
  max-width: 42vw;
  box-shadow: 0 4px 20px #0004;
  font:
    12px Archivo,
    system-ui;
}
.project-hud[hidden] {
  display: none;
}
.project-hud strong,
.project-hud span {
  display: block;
  margin-bottom: 7px;
}
.project-hud button {
  border: 1px solid #718577;
  border-radius: 4px;
  color: #f4eccf;
  background: #29483b;
  padding: 6px;
  margin-right: 6px;
  cursor: pointer;
}
.project-hud button:disabled {
  opacity: 0.5;
}
.museum-brief {
  padding: 20px;
  background: #e5e9de;
  border-left: 3px solid #68826b;
}
.asset-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.asset-choice {
  border: 2px solid #cccbbd !important;
  border-radius: 8px !important;
  background: #fffaf0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 142px;
}
.asset-choice[aria-pressed='true'] {
  border-color: #287653 !important;
  box-shadow: 0 0 0 2px #287653;
}
.asset-choice img {
  height: 110px;
  width: 100%;
  object-fit: contain;
}
.artifact-icon {
  display: grid;
  place-items: center;
  font: 32px Georgia;
  color: #c5a359;
  background: #244c45;
  width: 75px;
  height: 75px;
  border-radius: 50%;
}
.artifact-placeholder {
  height: 130px;
  background: linear-gradient(135deg, #284d47, #658576);
  display: grid;
  place-items: center;
  color: #f1deb8;
  font: 22px Georgia;
}
.exhibit-thumb {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #e8e5d8;
}
.museum-editor > .btn {
  margin: 14px 12px 0 0;
}
.museum-tour {
  position: fixed;
  inset: 0;
  background: #192b2b;
  z-index: 40;
  display: flex;
  flex-direction: column;
  color: #f3ebd8;
  font-family: Archivo, system-ui;
}
.museum-tour-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #19332f;
}
.museum-tour-top h2 {
  margin: 5px 0;
  font: 25px Georgia;
}
.museum-stage {
  position: relative;
  flex: 1;
  min-height: 200px;
  overflow: hidden;
  outline: none;
  touch-action: none;
  cursor: grab;
}
.museum-stage:active {
  cursor: grabbing;
}
.museum-stage canvas {
  display: block;
}
.museum-help {
  font-size: 12px;
  margin: 0;
  padding: 10px 20px;
  text-align: center;
  background: #152c28;
}
.museum-tour-bottom {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: #19332f;
}
.museum-tour button {
  background: #365447;
  color: #fff1d5;
  border: 1px solid #8a9c86;
  border-radius: 5px;
  padding: 9px 14px;
  cursor: pointer;
}
.museum-tour .btn.ghost {
  color: #fff1d5;
  border-color: #82977c;
}
.museum-tour button:disabled {
  opacity: 0.4;
}
.museum-tour select {
  width: min(360px, 40vw) !important;
  margin: 0 !important;
  background: #edf0dd !important;
  color: #1a3530 !important;
}
.museum-label {
  position: absolute;
  right: 24px;
  top: 100px;
  width: min(370px, 85vw);
  max-height: 65vh;
  overflow: auto;
  background: #f1ead9;
  color: #243d37;
  padding: 24px;
  box-shadow: 0 15px 45px #0006;
  border-top: 4px solid #ba995a;
}
.museum-label h3 {
  font: 27px Georgia;
  line-height: 1.3;
}
.museum-label p {
  line-height: 1.7;
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.museum-label small {
  display: block;
  margin: 14px 0;
  color: #617066;
}
.museum-label button {
  float: right;
  margin-bottom: 14px;
}
.project-setup {
  padding: 16px;
  background: #203b32;
  border: 1px solid #647463;
  border-radius: 8px;
  margin: 14px 0;
}
.project-setup textarea {
  width: 100%;
  box-sizing: border-box;
  background: #112b25;
  color: #eee7d0;
  border: 1px solid #6f7e69;
  padding: 10px;
  border-radius: 4px;
  font: 13px Archivo;
}
.project-setup p {
  font-size: 12px;
  line-height: 1.5;
  color: #c7ccb5;
}
.museum-page {
  margin: 0;
  background: #172f29;
  color: #f5e8c9;
  font-family: system-ui;
}
.museum-page > main {
  max-width: 700px;
  margin: 80px auto;
  padding: 24px;
}
.museum-page a {
  color: #dfc589;
}
@media (max-width: 700px) {
  .project-dialog {
    width: 98vw;
    inset: 1vh auto;
    max-height: 98vh;
  }
  .project-dialog > header {
    padding: 15px;
    gap: 10px;
  }
  .project-dialog h2 {
    font-size: 23px;
  }
  .project-body {
    padding: 16px;
  }
  .asset-picker {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-hud {
    top: 95px;
    max-width: 60vw;
  }
  .museum-tour-top {
    padding: 10px;
  }
  .museum-tour-top h2 {
    font-size: 19px;
  }
  .museum-tour-bottom {
    gap: 6px;
    flex-wrap: wrap;
  }
  .museum-help {
    font-size: 10px;
  }
  .museum-label {
    right: 10px;
    top: 80px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-dialog * {
    scroll-behavior: auto !important;
  }
}
.museum-stage canvas {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
}
.museum-tour-top,
.museum-tour-bottom,
.museum-help {
  flex-shrink: 0;
}
.museum-tour-top {
  z-index: 1;
}
.museum-tour * {
  box-sizing: border-box;
}

.museum-tour {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
}
.museum-tour::backdrop {
  background: #142825;
}
.project-dialog {
  --ink: #203a35;
  --edge: #a8b4a8;
  --brass: #805b19;
  --muted: #5c6b60;
}
.project-dialog .learning-passage {
  background: #e2e8db;
}
.project-dialog .learning-kind,
.project-dialog .learning-form summary {
  color: #76581f;
}
.project-dialog .learning-form .help {
  color: #53665a;
}
.project-dialog .learning-correct:before {
  color: #28603f;
}
.project-dialog .learning-review:before {
  color: #93541b;
}
