@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600&display=swap");

:root {
  --paper: #f3f0e7;
  --paper-deep: #e8e3d7;
  --ink: #252b29;
  --muted: #827e72;
  --red: #ad382f;
  --gold: #b99443;
  --line: rgba(52, 48, 37, .14);
  --serif: "Noto Serif SC", "Songti SC", SimSun, serif;
  --sans: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

body.modal-open {
  overflow: hidden;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  z-index: 5;
}

.topbar {
  height: 76px;
  padding: 0 4.5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-seal,
.seal-outline {
  color: var(--red);
  font-family: var(--serif);
  font-weight: 700;
}

.brand-seal {
  border: 1px solid var(--red);
  font-size: 22px;
  line-height: 34px;
  text-align: center;
  width: 34px;
  height: 34px;
}

.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .18em;
}

.brand small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .16em;
}

.topbar-note,
.top-actions {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .06em;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #728660;
  margin-right: 8px;
  box-shadow: 0 0 0 3px rgba(114, 134, 96, .15);
}

.top-actions {
  display: flex;
  gap: 24px;
}

.text-button {
  background: transparent;
  display: inline-flex;
  justify-content: center;
  min-width: 42px;
  white-space: nowrap;
  padding: 8px 0;
  color: var(--muted);
  overflow: hidden;
  position: relative;
  text-overflow: ellipsis;
  text-decoration: none;
}

.auth-state-pending {
  visibility: hidden;
}

.top-actions > .text-button:nth-child(1) { min-width: 70px; }
.top-actions > .text-button:nth-child(3) { min-width: 70px; }
.top-actions > .text-button:nth-child(4) { min-width: 70px; }
.top-actions > .text-button:nth-child(5) { min-width: 84px; }
.top-actions > .text-button[aria-current="page"],
.top-actions > .text-button.square-current {
  color: var(--red);
}

.text-button:after,
.outline-button:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform .2s;
  transform-origin: right;
}

.text-button:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

.about-workspace {
  width: min(1050px, calc(100% - 56px));
  margin: 0 auto;
  padding: 58px 0 80px;
}

.about-hero {
  margin-bottom: 32px;
}

.about-hero h1 {
  font: 42px var(--serif);
  letter-spacing: .08em;
  margin: 12px 0 8px;
}

.about-hero p {
  color: var(--muted);
  font-size: 13px;
}

.about-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 430px;
  padding: 0;
  background: rgba(255, 255, 255, .26);
}

.about-nav {
  border-right: 1px solid var(--line);
  padding: 26px 0;
}

.about-nav-item {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 14px var(--serif);
  padding: 16px 28px;
  text-align: left;
  position: relative;
  transition: color .2s, border-color .2s, letter-spacing .2s, transform .2s;
}

.about-nav-item:after {
  background: var(--red);
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease-out;
  width: 100%;
}

.about-nav-item:hover,
.about-nav-item:focus-visible,
.about-nav-item.active {
  color: var(--ink);
  letter-spacing: .08em;
  transform: translateX(4px);
}

.about-nav-item:hover:after,
.about-nav-item:focus-visible:after,
.about-nav-item.active:after {
  transform: scaleX(1);
}

.about-nav-item.active {
  color: var(--red);
}

.about-content {
  max-width: 650px;
  padding: 58px 68px;
}

.about-content h2 {
  font: 28px var(--serif);
  letter-spacing: .06em;
  margin: 16px 0 28px;
}

.about-content h2:empty {
  display: none;
}

.about-content p {
  color: #5f5a4f;
  font-size: 14px;
  line-height: 2.1;
  margin: 0 0 18px;
}

.about-content strong {
  color: var(--ink);
  font-family: var(--serif);
}

.about-feedback-link {
  color: var(--red);
  background: transparent;
  border: 0;
  cursor: pointer;
  display: inline-block;
  font-size: 13px;
  margin-top: 12px;
  padding: 0;
  text-decoration: none;
  transition: color .2s, transform .2s;
}

.about-feedback-link b {
  margin-left: 8px;
}

.about-feedback-link:hover {
  color: var(--ink);
  transform: translateX(4px);
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(35, 33, 27, .63);
  animation: fade-in .25s ease-out;
}

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

.feedback-modal {
  width: min(520px, 100%);
  position: relative;
  padding: 38px 40px 32px;
  background: var(--paper);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .3s ease-out;
}

.feedback-modal h2 {
  font: 26px var(--serif);
  margin: 14px 0 24px;
}

#feedback-form {
  display: grid;
  gap: 9px;
}

#feedback-form label {
  color: var(--muted);
  font-size: 11px;
}

#feedback-message {
  min-height: 150px;
  resize: vertical;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  font: 13px/1.8 var(--sans);
  padding: 10px 11px;
}

#feedback-message:focus {
  outline: 1px solid var(--gold);
}

.feedback-form-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 11px;
  margin: 2px 0 0;
}

.feedback-form-status.success {
  color: #728660;
}

.feedback-form-status.error {
  color: var(--red);
}

#feedback-submit:disabled {
  cursor: wait;
  opacity: .58;
}

.changelog-list {
  border-top: 1px solid var(--line);
}

.changelog-release {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 16px 10px;
  position: relative;
  text-align: left;
  transition: color .2s, border-color .2s, transform .2s;
  width: 100%;
}

.changelog-release:after {
  background: var(--red);
  bottom: -1px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease-out;
  width: 100%;
}

.changelog-release:hover,
.changelog-release:focus-visible {
  color: var(--ink);
  transform: translateX(4px);
}

.changelog-release:hover:after,
.changelog-release:focus-visible:after {
  transform: scaleX(1);
}

.changelog-release strong,
.changelog-version {
  color: var(--red);
  font: 16px var(--serif);
}

.changelog-release time,
.changelog-detail time {
  color: var(--muted);
  font-size: 11px;
}

.changelog-release-meta {
  align-items: center;
  display: flex;
  gap: 18px;
}

.changelog-release span {
  font-size: 12px;
}

.changelog-detail {
  border-left: 1px solid var(--line);
  min-height: 190px;
  padding-left: 30px;
}

.changelog-detail-view {
  position: relative;
}

.changelog-back {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: 12px var(--sans);
  padding: 5px 0;
  position: absolute;
  right: 0;
  top: -8px;
  transition: color .2s, transform .2s;
}

.changelog-back:hover {
  color: var(--red);
  transform: translateX(-3px);
}

.changelog-detail-view .changelog-detail {
  padding-top: 40px;
}

.changelog-meta {
  align-items: center;
  display: flex;
  gap: 18px;
}

.changelog-detail time {
  display: inline-block;
}

.changelog-detail h3 {
  font: 21px var(--serif);
  margin: 0 0 18px;
}

.changelog-detail ul {
  color: #5f5a4f;
  font-size: 13px;
  line-height: 2;
  margin: 0;
  padding-left: 20px;
}

.auth-panel {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 12;
  width: min(420px, calc(100vw - 28px));
  margin: 0;
  padding: 28px;
  background: var(--paper);
  box-shadow: 12px 16px 0 rgba(0, 0, 0, .18);
  transform: translate(-50%, -50%);
}

.auth-panel.auth-closed {
  display: none !important;
}

.auth-panel:target {
  display: block;
  animation: auth-pop .28s ease-out;
}

.auth-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11;
  background: rgba(35, 33, 27, .28);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

#auth-panel:target+.auth-backdrop {
  display: block;
  animation: fade-in .28s ease-out;
}

.auth-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: var(--muted);
  font: 24px/1 var(--serif);
  text-decoration: none;
}

.auth-panel form {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.auth-panel label {
  color: var(--muted);
  font-size: 11px;
}

.auth-panel input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  padding: 10px 11px;
  font: 13px var(--sans);
}

.auth-panel input:focus {
  outline: 1px solid var(--gold);
}

.auth-panel .combine-button {
  justify-self: start;
  margin-top: 8px;
}

.auth-switch {
  justify-self: start;
}

.auth-panel p {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 20;
  max-width: min(90vw, 430px);
  padding: 11px 18px;
  background: var(--ink);
  color: #fffaf0;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity .25s, transform .25s;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.warning {
  background: #8d6729;
}

.toast.error {
  background: var(--red);
}

.toast.success {
  background: #536c4d;
}

@keyframes auth-pop {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-50% - 14px));
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.workspace {
  display: grid;
  grid-template-columns: minmax(225px, 260px) minmax(430px, 1fr) minmax(270px, 330px);
  gap: 2.1vw;
  max-width: 1540px;
  min-height: calc(100vh - 76px);
  margin: auto;
  padding: 31px 4.5vw 38px;
  position: relative;
  z-index: 1;
}

.panel {
  background: rgba(247, 245, 237, .58);
  border: 1px solid var(--line);
}

.sidebar,
.archive-card {
  padding: 24px 21px;
}

.archive-card {
  scroll-margin-top: 24px;
  outline: none;
}

.archive-card.is-target {
  animation: target-pulse 1.2s ease-out;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.section-heading.compact {
  margin-bottom: 8px;
}

.eyebrow {
  color: var(--red);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
}

h2 {
  font: 600 20px var(--serif);
  letter-spacing: .1em;
  margin: 7px 0 0;
}

.ink-mark {
  color: var(--red);
  font: 22px var(--serif);
  border-left: 1px solid var(--red);
  padding-left: 9px;
}

.intro {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.9;
  margin: 21px 0 24px;
}

.tool-section {
  border-top: 1px solid var(--line);
  padding: 18px 0 16px;
}

.tool-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 13px;
  font-family: var(--serif);
  font-size: 14px;
}

.tool-title em {
  color: var(--muted);
  font: 9px var(--sans);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.attribute-button {
  min-height: 66px;
  background: transparent;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 4px;
  position: relative;
  transition: background .2s, border .2s, transform .2s;
}

.attribute-button:hover,
.attribute-button.selected {
  background: rgba(255, 255, 255, .56);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.attribute-button.selected:before {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 5px;
  color: var(--red);
  font-size: 10px;
}

.attribute-button img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  opacity: .85;
  mix-blend-mode: multiply;
}

.attribute-button span:last-of-type {
  font: 10px var(--serif);
  text-align: center;
}

.attribute-button i {
  color: var(--muted);
  font: 8px var(--sans);
  font-style: normal;
}

.color-swatch,
.knowledge-color {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.hint-card {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 11px;
  background: rgba(185, 148, 67, .1);
  color: #756e5e;
  font-size: 10px;
  line-height: 1.7;
}

.hint-card p {
  margin: 0;
}

.hint-icon {
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50%;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  text-align: center;
  font-family: var(--serif);
}

.atelier {
  display: flex;
  flex-direction: column;
  padding: 26px 3.7vw 31px;
  border-color: rgba(52, 48, 37, .08);
}

.atelier-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-label {
  color: var(--muted);
  font-size: 10px;
}

.progress-label.ready {
  color: #71825e;
}

.workbench {
  flex: 1;
  min-height: 390px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7%;
  padding: 40px 0 17px;
}

.workbench-copy {
  align-self: center;
  max-width: 210px;
}

.seal-outline {
  border: 1px solid rgba(173, 56, 47, .55);
  display: inline-block;
  padding: 8px 7px 6px;
  font-size: 18px;
  margin-bottom: 20px;
}

.workbench-copy h1 {
  font: 600 clamp(25px, 3vw, 39px) / 1.5 var(--serif);
  letter-spacing: .15em;
  margin: 0;
}

.workbench-copy h1 i {
  color: var(--red);
  font-style: normal;
}

.workbench-copy p {
  color: var(--muted);
  font-size: 11px;
  line-height: 2;
  margin-top: 17px;
}

.artifact-preview {
  width: min(310px, 47%);
  aspect-ratio: 1 / 1.05;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-glow {
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 148, 67, .16), transparent 67%);
}

.preview-vessel {
  width: 62%;
  height: 45%;
  background: linear-gradient(105deg, #451b19 0%, #9c312a 44%, #4a1717 100%);
  border-radius: 13% 13% 24% 24% / 10% 10% 46% 46%;
  box-shadow: inset 12px 6px 18px rgba(255, 180, 123, .2), inset -13px -12px 23px rgba(0, 0, 0, .3), 0 24px 22px rgba(44, 30, 17, .13);
  position: relative;
  transform: rotate(-3deg);
  z-index: 1;
}

.preview-vessel:before {
  content: "";
  position: absolute;
  width: 111%;
  height: 15%;
  left: -5.5%;
  top: -5%;
  border-radius: 50%;
  background: #2d1815;
  box-shadow: inset 0 4px 5px rgba(233, 157, 91, .33);
}

.preview-vessel:after {
  content: "";
  position: absolute;
  width: 28%;
  height: 10%;
  left: 34%;
  top: 16%;
  border-bottom: 1px solid rgba(211, 163, 69, .55);
  border-radius: 50%;
}

.preview-vessel span {
  position: absolute;
  inset: 20% 14%;
  border: 1px solid rgba(218, 164, 58, .36);
  border-radius: 50%;
  transform: rotate(20deg);
}

.preview-caption {
  color: var(--muted);
  font: 10px var(--serif);
  letter-spacing: .12em;
  margin-top: 25px;
}

.selected-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}

.selection-slot {
  text-align: center;
  min-width: 72px;
}

.selection-slot span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 5px;
}

.selection-slot strong {
  font: 14px var(--serif);
}

.selection-divider {
  color: var(--gold);
  font: 18px var(--serif);
}

.combine-area {
  text-align: center;
  padding-top: 23px;
}

.combine-button {
  min-width: 164px;
  padding: 13px 17px;
  background: var(--red);
  color: #fffaf0;
  letter-spacing: .14em;
  font: 14px var(--serif);
  box-shadow: 5px 5px 0 rgba(173, 56, 47, .12);
  transition: transform .2s, box-shadow .2s;
}

.combine-button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(173, 56, 47, .14);
}

.combine-button b {
  margin-left: 22px;
  font: 17px var(--sans);
}

.feedback {
  min-height: 17px;
  color: #788768;
  font-size: 10px;
  margin: 11px 0 0;
}

.feedback.warning {
  color: var(--red);
}

.feedback.success {
  color: #728660;
}

.node-count {
  color: var(--muted);
  font-size: 9px;
  margin-top: 7px;
}

.node-count:first-letter {
  color: #79936e;
}

.knowledge-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-top: 21px;
}

.knowledge-tab {
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  padding: 9px 8px;
  position: relative;
}

.knowledge-tab.active {
  color: var(--red);
}

.knowledge-tab.active:after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--red);
  bottom: -1px;
  left: 8px;
  right: 8px;
}

.knowledge-list {
  min-height: 225px;
}

.knowledge-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: transparent;
  padding: 13px 3px;
  border-bottom: 1px solid rgba(52, 48, 37, .08);
}

.knowledge-item:hover strong {
  color: var(--red);
}

.knowledge-item img,
.knowledge-item .knowledge-color {
  width: 31px;
  height: 31px;
  object-fit: cover;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.knowledge-item span:nth-child(2) {
  flex: 1;
}

.knowledge-item strong,
.knowledge-item small {
  display: block;
}

.knowledge-item strong {
  font: 12px var(--serif);
}

.knowledge-item small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 3px;
}

.knowledge-item b {
  color: var(--gold);
  font-weight: 400;
}

.outline-button {
  display: inline-block;
  background: transparent;
  color: var(--red);
  font: 11px var(--serif);
  padding: 14px 0 2px;
  position: relative;
  text-decoration: none;
}

.outline-button span {
  margin-left: 14px;
}

.quote-card {
  margin-top: 20px;
  padding: 22px 25px;
  background: #3a3a35;
  color: #e6d9bd;
  min-height: 130px;
  position: relative;
}

.quote-mark {
  color: #b99443;
  font: 40px Georgia;
  line-height: 20px;
}

.quote-card p {
  font: 13px/2 var(--serif);
  letter-spacing: .08em;
  margin: 7px 0;
}

.quote-card small {
  color: #a59c89;
  font-size: 10px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 33, 27, .63);
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  animation: fade-in .25s ease-out;
}

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

.artifact-modal {
  max-width: 770px;
  width: 100%;
  background: var(--paper);
  display: grid;
  grid-template-columns: 44% 56%;
  position: relative;
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .38s ease-out;
}

.modal-image-wrap {
  min-height: 455px;
  background: #d8d0c1;
  overflow: hidden;
}

.modal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
}

.modal-content {
  padding: 51px 42px;
}

.modal-content h2 {
  font-size: 27px;
  line-height: 1.6;
  letter-spacing: .08em;
  margin: 15px 0 6px;
}

.modal-meta {
  color: var(--gold);
  font: 11px var(--serif);
}

.artifact-counter {
  color: var(--red);
  font-size: 10px !important;
  margin: 10px 0 0 !important;
}

.modal-rule {
  width: 35px;
  border-top: 2px solid var(--red);
  margin: 27px 0 22px;
}

.modal-content>p:not(.modal-meta) {
  color: #625e55;
  font: 13px/2.1 var(--serif);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 29px;
}

.modal-tags span {
  border: 1px solid rgba(173, 56, 47, .35);
  color: var(--red);
  font-size: 9px;
  padding: 5px 9px;
}

.combine-button.small {
  min-width: 135px;
  padding: 10px 13px;
  font-size: 11px;
}

.modal-close {
  position: absolute;
  z-index: 1;
  right: 15px;
  top: 10px;
  background: transparent;
  color: #706b60;
  font-size: 25px;
  line-height: 1;
}

.artifact-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 54px;
  background: rgba(35, 33, 27, .72);
  color: #fff8ea;
  font-size: 34px;
  line-height: 1;
  font-family: Georgia, serif;
}

.artifact-nav:hover {
  background: var(--red);
}

.artifact-nav.previous {
  left: -17px;
}

.artifact-nav.next {
  right: -17px;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes target-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(185, 148, 67, 0);
  }

  35% {
    box-shadow: 0 0 0 5px rgba(185, 148, 67, .28);
  }
}

.knowledge-workspace {
  max-width: 1140px;
  margin: auto;
  padding: 74px 4.5vw 80px;
  position: relative;
  z-index: 1;
}

.knowledge-hero {
  border-bottom: 1px solid var(--line);
  padding-bottom: 42px;
}

.knowledge-hero h1 {
  font: 600 clamp(35px, 5vw, 58px) var(--serif);
  letter-spacing: .16em;
  margin: 18px 0 14px;
}

.knowledge-hero p {
  color: var(--muted);
  font: 13px/2 var(--serif);
  margin: 0;
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 55px;
  padding-top: 38px;
}

.knowledge-nav {
  align-self: start;
  padding: 27px 24px 23px;
}

.knowledge-nav h2 {
  margin-bottom: 25px;
}

.category-nav {
  border-top: 1px solid var(--line);
}

.category-button {
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr 20px;
  grid-template-rows: 27px 22px;
  column-gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: relative;
}

.category-button>span {
  grid-row: 1 / 3;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  place-items: center;
  font: 15px var(--serif);
}

.category-button strong {
  font: 15px var(--serif);
}

.category-button small {
  color: var(--muted);
  font-size: 9px;
}

.category-button b {
  color: var(--gold);
  font-size: 16px;
  font-weight: 400;
  opacity: .35;
}

.category-button.active>span {
  background: var(--red);
  border-color: var(--red);
  color: #fff8ea;
}

.category-button.active strong,
.category-button:hover strong {
  color: var(--red);
}

.category-button.active b {
  opacity: 1;
}

.back-workshop {
  display: inline-block;
  color: var(--red);
  font: 11px var(--serif);
  margin-top: 27px;
  text-decoration: none;
}

.knowledge-results {
  min-width: 0;
}

.results-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding: 0 0 17px;
}

.results-heading h2 {
  font-size: 25px;
  margin-top: 10px;
}

.results-heading>span {
  color: var(--muted);
  font-size: 10px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding-top: 18px;
}

.knowledge-node {
  background: rgba(247, 245, 237, .6);
  border: 1px solid var(--line);
  animation: node-in .45s both;
  animation-delay: var(--delay);
}

.node-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr 24px;
  align-items: center;
  gap: 14px;
  text-align: left;
  background: transparent;
  padding: 18px;
}

.node-visual {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: rgba(232, 227, 215, .55);
}

.node-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.node-visual i {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid rgba(255, 255, 255, .7);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .18);
}

.node-visual .node-glyph {
  background: var(--red);
  color: #fff8ea;
  display: grid;
  place-items: center;
  font: 16px var(--serif);
}

.node-name strong,
.node-name small {
  display: block;
}

.node-name strong {
  font: 16px var(--serif);
}

.node-name small {
  color: var(--muted);
  font-size: 10px;
  margin-top: 6px;
}

.node-plus {
  color: var(--gold);
  font-size: 20px;
  font-weight: 300;
  transition: transform .2s;
}

.knowledge-node.expanded .node-plus {
  transform: rotate(45deg);
}

.node-description {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s;
}

.node-description p {
  overflow: hidden;
  color: var(--muted);
  font: 12px/1.9 var(--serif);
  margin: 0;
  padding: 0 18px;
}

.knowledge-node.expanded .node-description {
  grid-template-rows: 1fr;
}

.knowledge-node.expanded .node-description p {
  padding-bottom: 18px;
}

@keyframes node-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-workspace {
  max-width: 1240px;
  margin: auto;
  padding: 58px 4.5vw 80px;
  position: relative;
  z-index: 1;
}

.profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 36px;
}

.profile-hero h1 {
  font: 600 clamp(35px, 5vw, 58px) var(--serif);
  letter-spacing: .16em;
  margin: 16px 0 11px;
}

.profile-hero p {
  color: var(--muted);
  font: 13px var(--serif);
  margin: 0;
}

.profile-seal {
  width: 112px;
  height: 112px;
  border: 1px solid rgba(173, 56, 47, .48);
  color: var(--red);
  display: grid;
  place-items: center;
  align-content: center;
  transform: rotate(4deg);
}

.profile-seal span {
  font: 43px var(--serif);
}

.profile-seal small {
  font-size: 9px;
  letter-spacing: .18em;
  margin-top: 5px;
}

.profile-summary {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  align-items: center;
  margin-top: 28px;
  padding: 22px 27px;
}

.profile-title h2 {
  font-size: 24px;
  margin-top: 7px;
}

.profile-title p {
  color: var(--muted);
  font: 11px var(--serif);
  margin: 9px 0 0;
}

.profile-stat {
  border-left: 1px solid var(--line);
  padding-left: 25px;
}

.profile-stat strong {
  display: block;
  color: var(--red);
  font: 30px var(--serif);
}

.profile-stat span {
  color: var(--muted);
  font-size: 10px;
}

.progress-stat i {
  display: block;
  width: 80px;
  height: 3px;
  background: var(--paper-deep);
  margin-top: 9px;
}

.progress-stat i b {
  display: block;
  height: 100%;
  background: var(--gold);
  width: 0;
  transition: width .5s;
}

.profile-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 51px 0 22px;
}

.profile-heading p {
  color: var(--muted);
  font-size: 10px;
  margin: 0;
}

.easter-egg-section {
  margin-top: 51px;
}

.easter-egg-card {
  min-height: 197px;
}

.easter-egg-card.unlocked:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.easter-egg-card .collection-image {
  height: 145px;
}

.easter-egg-card strong {
  margin-top: 9px;
}

.easter-egg-card.unlocked .collection-image {
  position: relative;
}

.easter-egg-card.unlocked .collection-image strong {
  display: block;
  margin: 0;
  color: var(--red);
  font: 16px var(--serif);
  writing-mode: vertical-rl;
  text-orientation: upright;
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
}

.easter-egg-backdrop {
  z-index: 13;
}

.easter-egg-modal {
  width: min(780px, 100%);
  min-height: 380px;
  display: grid;
  grid-template-columns: 39% 61%;
  position: relative;
  background: var(--paper);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .38s ease-out;
}

.easter-egg-name {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 17px;
  padding: 40px 30px;
  background: var(--paper-deep);
  text-align: center;
}

.easter-egg-name h2 {
  color: var(--red);
  font: 600 clamp(24px, 3vw, 34px) var(--serif);
  letter-spacing: .12em;
  line-height: 1.6;
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.easter-egg-content {
  padding: 55px 42px 42px;
}

.easter-egg-message {
  color: var(--red);
  font: 600 17px var(--serif);
  margin: 0 0 18px;
}

.easter-egg-recipe {
  color: var(--gold);
  font: 12px/1.9 var(--serif);
  margin: 0;
}

.easter-egg-content>p:not(.easter-egg-message):not(.easter-egg-recipe) {
  color: #625e55;
  font: 13px/2.1 var(--serif);
  margin-bottom: 26px;
}

.era-section {
  margin-bottom: 37px;
}

.era-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 13px;
}

.era-label>span {
  color: var(--red);
  font: 11px var(--sans);
  letter-spacing: .1em;
}

.era-label h2 {
  font-size: 18px;
  margin: 0;
}

.era-label i {
  color: var(--muted);
  font: 10px var(--sans);
  font-style: normal;
  margin-left: auto;
}

.artifact-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  padding: 2px 3px 14px;
  cursor: grab;
}

.artifact-rail:active {
  cursor: grabbing;
}

.collection-card {
  flex: 0 0 152px;
  min-height: 197px;
  border: 1px solid var(--line);
  background: rgba(247, 245, 237, .7);
  padding: 9px 9px 12px;
  text-align: left;
  transition: transform .2s, border-color .2s;
}

.collection-card.unlocked {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.collection-card.unlocked:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.collection-card.locked {
  background: rgba(212, 208, 198, .28);
  cursor: not-allowed;
}

.collection-image {
  height: 145px;
  display: grid;
  place-items: center;
  background: rgba(232, 227, 215, .46);
  overflow: hidden;
}

.collection-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  filter: grayscale(.95) contrast(.82);
}

.lock-shadow {
  color: rgba(67, 63, 54, .3);
  font: 11px var(--serif);
  letter-spacing: .18em;
}

.collection-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 12px var(--serif);
  margin-top: 9px;
}

.collection-card.locked strong {
  color: rgba(67, 63, 54, .35);
}

.collection-card small {
  color: var(--muted);
  font-size: 9px;
  margin-top: 4px;
  display: block;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(35, 33, 27, .63);
  animation: fade-in .25s ease-out;
}

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

.profile-detail {
  max-width: 760px;
  width: 100%;
  background: var(--paper);
  display: grid;
  grid-template-columns: 43% 57%;
  position: relative;
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .35s ease-out;
}

.profile-detail>img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  mix-blend-mode: multiply;
  background: var(--paper-deep);
}

.profile-detail-content {
  padding: 48px 40px;
}

.profile-detail-content h2 {
  font-size: 25px;
  line-height: 1.6;
  margin: 15px 0 7px;
}

.profile-detail-content>p:not(.modal-meta) {
  color: #625e55;
  font: 13px/2.1 var(--serif);
}

.artifact-detail-page {
  max-width: 1080px;
  margin: auto;
  padding: 42px 4.5vw 80px;
  position: relative;
  z-index: 1;
}

.detail-back {
  display: inline-block;
  color: var(--red);
  font: 11px var(--serif);
  text-decoration: none;
  margin-bottom: 27px;
}

.artifact-detail-layout {
  display: grid;
  grid-template-columns: minmax(350px, 46%) 1fr;
  min-height: 570px;
  background: rgba(247, 245, 237, .58);
  border: 1px solid var(--line);
}

.artifact-detail-image {
  background: var(--paper-deep);
  min-height: 570px;
}

.artifact-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
}

.artifact-detail-copy {
  padding: 70px 65px;
}

.artifact-detail-copy h1 {
  font: 600 clamp(28px, 4vw, 45px) / 1.5 var(--serif);
  letter-spacing: .1em;
  margin: 16px 0 8px;
}

.detail-meta {
  color: var(--gold);
  font: 12px var(--serif);
}

.detail-description {
  color: #625e55;
  font: 14px/2.2 var(--serif);
  margin: 0 0 37px;
}

.detail-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.detail-fields div {
  border-bottom: 1px solid var(--line);
  padding: 15px 12px 15px 0;
}

.detail-fields div:nth-child(even) {
  padding-left: 15px;
  border-left: 1px solid var(--line);
}

.detail-fields small,
.detail-fields strong {
  display: block;
}

.detail-fields small {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 6px;
}

.detail-fields strong {
  font: 13px var(--serif);
  color: var(--ink);
}

.combine-button.small,
.detail-button {
  text-decoration: none;
  display: inline-block;
}

@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 210px minmax(380px, 1fr);
  }

  .rightbar {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .knowledge-list {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .knowledge-item {
    border-right: 1px solid var(--line);
    padding: 13px;
  }
}

@media (max-width: 700px) {
  .topbar {
    height: 64px;
    padding: 0 20px;
  }

  .topbar-note {
    display: none;
  }

  .top-actions {
    gap: 12px;
    font-size: 10px;
  }

  .about-workspace {
    width: calc(100% - 28px);
    padding: 34px 0 50px;
  }

  .about-hero h1 {
    font-size: 32px;
  }

  .about-layout {
    display: block;
  }

  .about-nav {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 0;
  }

  .about-nav-item {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    padding: 15px 4px;
    text-align: center;
  }

  .about-nav-item:hover,
  .about-nav-item.active {
    border-left-color: transparent;
    transform: translateY(-2px);
  }

  .about-content {
    padding: 36px 24px 42px;
  }

  .about-content h2 {
    font-size: 23px;
  }

  .changelog-detail {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 28px;
    padding: 28px 0 0;
  }

  .changelog-release {
    align-items: flex-start;
    display: grid;
  }

  .changelog-release-meta {
    gap: 12px;
  }

  .workspace {
    display: block;
    padding: 18px 14px 28px;
  }

  .sidebar,
  .atelier,
  .rightbar {
    margin-bottom: 18px;
  }

  .atelier {
    padding: 22px 18px;
  }

  .workbench {
    min-height: 330px;
    gap: 0;
  }

  .workbench-copy {
    max-width: 45%;
  }

  .workbench-copy h1 {
    font-size: 25px;
  }

  .workbench-copy p {
    font-size: 10px;
  }

  .artifact-preview {
    width: 52%;
  }

  .selected-strip {
    gap: 8px;
  }

  .selection-slot {
    min-width: 63px;
  }

  .selection-slot strong {
    font-size: 12px;
  }

  .rightbar {
    display: block;
  }

  .quote-card {
    display: none;
  }

  .knowledge-list {
    display: block;
  }

  .knowledge-item {
    border-right: 0;
  }

  .artifact-modal {
    display: block;
    max-height: 90vh;
    overflow: auto;
  }

  .modal-image-wrap {
    min-height: 230px;
    height: 35vh;
  }

  .modal-content {
    padding: 28px 24px 30px;
  }

  .modal-content h2 {
    font-size: 21px;
  }

  .artifact-nav.previous {
    left: 8px;
  }

  .artifact-nav.next {
    right: 8px;
  }
}

@media (max-width: 700px) {
  .knowledge-workspace {
    padding: 42px 18px 55px;
  }

  .knowledge-layout {
    display: block;
    padding-top: 24px;
  }

  .knowledge-nav {
    margin-bottom: 30px;
  }

  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-hero {
    padding-bottom: 28px;
  }

  .knowledge-hero h1 {
    font-size: 36px;
  }
}

@media (max-width: 700px) {
  .profile-workspace {
    padding: 38px 18px 55px;
  }

  .profile-hero {
    align-items: flex-start;
  }

  .profile-seal {
    width: 78px;
    height: 78px;
  }

  .profile-seal span {
    font-size: 30px;
  }

  .profile-seal small {
    font-size: 7px;
  }

  .profile-summary {
    grid-template-columns: 1fr 1fr;
    gap: 20px 0;
    padding: 19px;
  }

  .profile-title {
    grid-column: 1 / -1;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }

  .profile-stat {
    padding-left: 15px;
  }

  .profile-stat:nth-child(2) {
    border-left: 0;
  }

  .profile-heading {
    display: block;
  }

  .profile-heading p {
    margin-top: 8px;
  }

  .profile-detail {
    display: block;
    max-height: 90vh;
    overflow: auto;
  }

  .profile-detail>img {
    min-height: 230px;
    height: 33vh;
  }

  .profile-detail-content {
    padding: 28px 24px;
  }
}

@media (max-width: 700px) {
  .artifact-detail-page {
    padding: 27px 14px 55px;
  }

  .artifact-detail-layout {
    display: block;
  }

  .artifact-detail-image {
    min-height: 300px;
    height: 43vh;
  }

  .artifact-detail-copy {
    padding: 32px 24px 37px;
  }

  .artifact-detail-copy h1 {
    font-size: 28px;
  }

  .detail-fields {
    grid-template-columns: 1fr;
  }

  .detail-fields div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
}

/* Main workshop: keep the material controls and workbench within one desktop viewport. */
@media (min-width: 701px) {
  body:not(.knowledge-page) .workspace {
    grid-template-columns: minmax(250px, 285px) minmax(0, 1fr);
    min-height: calc(100vh - 76px);
    padding-top: 22px;
    padding-bottom: 22px;
  }

  body:not(.knowledge-page) .sidebar {
    align-self: start;
    position: relative;
    z-index: 2;
  }

  body:not(.knowledge-page) .atelier {
    align-self: start;
    position: relative;
    z-index: 1;
  }

  body:not(.knowledge-page) .atelier {
    min-height: calc(100vh - 170px);
    padding-top: 20px;
    padding-bottom: 20px;
  }

  body:not(.knowledge-page) .workbench {
    min-height: 0;
    padding-top: 10px;
    padding-bottom: 8px;
  }

  body:not(.knowledge-page) .selected-strip {
    padding-top: 11px;
    padding-bottom: 11px;
  }

  body:not(.knowledge-page) .combine-area {
    padding-top: 14px;
  }

  body:not(.knowledge-page) .feedback {
    margin-top: 6px;
  }

  body:not(.knowledge-page) .tool-section {
    max-height: 47px;
    overflow: hidden;
    transition: max-height .28s ease;
  }

  body:not(.knowledge-page) .tool-section:hover,
  body:not(.knowledge-page) .tool-section:focus-within {
    max-height: 330px;
    position: relative;
    z-index: 3;
    background: var(--paper);
    box-shadow: 0 8px 18px rgba(52, 48, 37, .08);
  }
}

/* Knowledge archive tree */
.knowledge-tree {
  display: block;
  padding-top: 18px;
}

.tree-root {
  display: grid;
  gap: 10px;
}

.tree-node {
  background: rgba(247, 245, 237, .6);
  border: 1px solid var(--line);
  animation: node-in .45s both;
  animation-delay: var(--delay);
}

.tree-node .node-toggle {
  min-height: 78px;
}

.tree-node .node-visual {
  width: 48px;
  height: 48px;
}

.tree-node .node-name strong {
  font-size: 17px;
}

.tree-node .node-plus {
  line-height: 1;
}

.tree-node.leaf .node-toggle {
  min-height: 62px;
  padding: 11px 15px 11px 22px;
}

.tree-node.leaf .node-visual {
  width: 38px;
  height: 38px;
}

.tree-node.leaf .node-name strong {
  font-size: 14px;
}

.tree-node.leaf .node-name .technique-summary {
  max-width: 46em;
  line-height: 1.45;
}

.tree-node.leaf .node-plus {
  color: var(--line);
  font-size: 14px;
}

.tree-children {
  display: grid;
  gap: 8px;
  margin: 0 17px 15px 38px;
  padding-left: 18px;
  border-left: 1px solid rgba(185, 148, 67, .45);
}

.tree-children .tree-children {
  margin-left: 25px;
}

.tree-node:not(.expanded)>.tree-children {
  display: none;
}

.tree-node.expanded>.node-toggle {
  background: rgba(232, 227, 215, .3);
}

.tree-node.expanded>.node-toggle .node-plus {
  transform: rotate(45deg);
}

.tree-node .node-description p {
  padding-left: 18px;
  padding-right: 18px;
}

.leaf-link {
  color: inherit;
  text-decoration: none;
}

.leaf-link:hover {
  background: rgba(232, 227, 215, .3);
}

.leaf-link .node-plus {
  color: var(--gold);
}

.knowledge-detail-page-main {
  max-width: 1050px;
  margin: auto;
  padding: 45px 4.5vw 80px;
  position: relative;
  z-index: 1;
}

.knowledge-detail-card {
  display: grid;
  grid-template-columns: 39% 61%;
  min-height: 490px;
}

.knowledge-detail-visual {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 20px;
  background: var(--paper-deep);
  color: var(--muted);
  font-size: 11px;
}

.detail-color-swatch {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: var(--swatch);
  border: 10px solid rgba(255, 255, 255, .55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
}

.detail-node-glyph {
  width: 170px;
  height: 170px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff8ea;
  font: 86px var(--serif);
}

.knowledge-detail-copy {
  padding: 70px 72px;
}

.knowledge-detail-copy h1 {
  font: 600 clamp(30px, 4vw, 48px) var(--serif);
  letter-spacing: .12em;
  margin: 16px 0 8px;
}

.knowledge-detail-parent {
  color: var(--gold);
  font: 12px var(--serif);
}

.knowledge-detail-description {
  color: #625e55;
  font: 14px/2.2 var(--serif);
}

.knowledge-detail-meta {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  padding-top: 16px;
  margin-top: 32px;
}

.detail-node-image {
  width: min(72%, 250px);
  max-height: 250px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

@media (max-width: 700px) {
  .knowledge-detail-page-main {
    padding: 28px 14px 55px;
  }

  .knowledge-detail-card {
    display: block;
  }

  .knowledge-detail-visual {
    min-height: 260px;
  }

  .detail-color-swatch,
  .detail-node-glyph {
    width: 120px;
    height: 120px;
  }

  .detail-node-glyph {
    font-size: 60px;
  }

  .knowledge-detail-copy {
    padding: 34px 25px 42px;
  }
}

/* Community square */
.square-current {
  color: var(--red);
}

.square-workspace {
  max-width: 1120px;
  margin: auto;
  padding: 48px 4.5vw 70px;
  position: relative;
  z-index: 1;
}

.square-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 0 0 31px;
}

.square-hero h1 {
  font: 600 clamp(34px, 5vw, 52px) var(--serif);
  letter-spacing: .16em;
  margin: 13px 0 9px;
}

.square-hero p {
  color: var(--ink);
  font: 17px var(--serif);
  margin: 0 0 9px;
}

.square-hero small {
  color: var(--muted);
  font-size: 11px;
}

.square-publish {
  flex: 0 0 auto;
  margin-bottom: 5px;
}

.square-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
}

.square-categories {
  display: flex;
  flex-wrap: wrap;
}

.square-tab {
  background: transparent;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 17px 15px 14px;
  font-size: 12px;
}

.square-tab:hover,
.square-tab.active {
  border-bottom-color: var(--red);
  color: var(--red);
}

.square-filters {
  display: flex;
  gap: 16px;
}

.square-filters label {
  color: var(--muted);
  font-size: 11px;
}

.square-filters select,
#publish-form select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 11px var(--sans);
  margin-left: 5px;
}

.square-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding-top: 21px;
}

.square-card {
  padding: 22px 24px 16px;
  transition: transform .2s, border-color .2s;
}

.square-card:hover {
  border-color: rgba(185, 148, 67, .62);
  transform: translateY(-2px);
}

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 31px;
  height: 31px;
  border: 1px solid var(--red);
  color: var(--red);
  display: grid;
  place-items: center;
  font: 15px var(--serif);
}

.post-head strong {
  display: block;
  font: 13px var(--serif);
}

.post-head small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.post-tag,
.post-status {
  margin-left: auto;
  border: 1px solid rgba(173, 56, 47, .3);
  color: var(--red);
  padding: 4px 7px;
  font-size: 9px;
  white-space: nowrap;
}

.post-delete {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  padding: 0 0 2px 6px;
}

.post-delete:hover {
  color: var(--red);
}

.square-card>p {
  color: #625e55;
  font: 13px/1.9 var(--serif);
  margin: 18px 0 17px;
}

.recipe-box {
  border-left: 2px solid var(--gold);
  background: rgba(185, 148, 67, .09);
  margin: 18px 0 14px;
  padding: 12px 14px;
}

.recipe-box small {
  color: var(--muted);
  display: block;
  font-size: 10px;
}

.recipe-box strong {
  display: block;
  font: 16px var(--serif);
  margin: 7px 0 11px;
}

.artifact-reveal {
  background: transparent;
  color: var(--red);
  font-size: 11px;
  padding: 0;
  text-align: left;
}

.artifact-reveal:hover {
  text-decoration: underline;
}

.artifact-name {
  color: var(--muted);
  font-size: 11px;
}

.post-foot {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 13px;
}

.post-action {
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 0;
}

.post-action:hover,
.post-action.is-liked {
  color: var(--red);
}

.post-state {
  margin-left: auto;
}

.post-state .verified {
  border-color: rgba(83, 108, 77, .4);
  color: #536c4d;
}

.post-content,
.comment-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-content strong {
  display: block;
  margin-bottom: 4px;
}

.square-empty {
  grid-column: 1 / -1;
  padding: 55px 20px;
  text-align: center;
}

.square-empty .seal-outline {
  margin: 0 auto 10px;
}

.square-empty h2 {
  font-size: 18px;
}

.square-empty p {
  color: var(--muted);
  font-size: 12px;
}

.square-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(35, 33, 27, .63);
  animation: fade-in .25s ease-out;
}

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

.settings-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(35, 33, 27, .63);
  animation: fade-in .25s ease-out;
}

.settings-backdrop[hidden] {
  display: none;
}

.settings-panel {
  width: min(440px, 100%);
  position: relative;
  padding: 38px 40px 30px;
  background: var(--paper);
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .3s ease-out;
}

.settings-panel h2 {
  margin-bottom: 24px;
}

.settings-group,
.settings-account {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}

.settings-group>label:first-child,
.settings-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 10px;
}

.settings-panel select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  padding: 10px 11px;
  font: 12px var(--sans);
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 12px;
  margin-top: 10px;
}

.settings-toggle input {
  accent-color: var(--red);
}

.settings-volume {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  margin: 10px 0 0 24px;
}

.settings-volume span {
  display: flex;
  justify-content: space-between;
}

.settings-volume output {
  color: var(--red);
}

.settings-volume input {
  accent-color: var(--red);
  width: 100%;
}

.settings-account strong {
  display: block;
  font: 16px var(--serif);
  margin-bottom: 14px;
}

.settings-account button {
  margin-right: 18px;
}

.settings-account button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

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

.square-dialog {
  width: min(590px, 100%);
  max-height: 90vh;
  overflow: auto;
  position: relative;
  background: var(--paper);
  padding: 39px 42px 32px;
  box-shadow: 14px 18px 0 rgba(0, 0, 0, .12);
  animation: slide-down .3s ease-out;
}

.square-dialog h2 {
  font-size: 26px;
  margin: 12px 0 22px;
}

.square-dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  margin-top: 14px;
}

.square-dialog label em {
  color: var(--gold);
  font-style: normal;
  font-size: 9px;
  margin-left: 5px;
}

.square-dialog input,
.square-dialog textarea,
.square-dialog select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  padding: 10px 11px;
  font: 12px var(--sans);
}

.square-dialog textarea {
  min-height: 120px;
  resize: vertical;
}

.square-dialog input:focus,
.square-dialog textarea:focus,
.square-dialog select:focus {
  outline: 1px solid var(--gold);
}

.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 24px;
}

.reveal-dialog p {
  color: #625e55;
  font: 13px/2 var(--serif);
}

.detail-dialog {
  padding-top: 42px;
}

.detail-author {
  color: var(--muted);
  font-size: 11px;
}

.detail-dialog p {
  color: #625e55;
  font: 13px/2 var(--serif);
}

.detail-artifact {
  color: var(--red) !important;
}

.comment-list {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 12px;
}

.comment-list p {
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  margin: 0;
  padding: 9px 0;
}

.comment-list p strong {
  color: var(--red);
  font-size: 10px;
  margin-right: 10px;
}

.comment-list>small {
  color: var(--muted);
}

.comment-form {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.comment-form textarea {
  min-height: 72px;
  resize: vertical;
  flex: 1;
}

.comment-form .combine-button {
  min-width: 65px;
}

@media (max-width: 700px) {
  .square-workspace {
    padding: 34px 14px 50px;
  }

  .square-hero {
    display: block;
  }

  .square-hero h1 {
    font-size: 38px;
  }

  .square-publish {
    margin-top: 23px;
  }

  .square-toolbar {
    display: block;
    padding: 0 10px;
  }

  .square-categories {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .square-tab {
    white-space: nowrap;
    padding-left: 10px;
    padding-right: 10px;
  }

  .square-filters {
    padding: 12px 5px;
    justify-content: space-between;
  }

  .square-list {
    grid-template-columns: 1fr;
  }

  .square-dialog {
    padding: 34px 24px 26px;
  }

  .post-tag {
    align-self: flex-start;
  }

  .top-actions {
    max-width: 70%;
    overflow-x: auto;
  }
}

/* ---------- 纹样图典（knowledge 页 · pattern 树状图 + 实物详情） ---------- */
.pattern-leaf { cursor: pointer; }
.pattern-leaf .node-toggle:hover .node-name strong { color: var(--red); }
.pattern-modal { max-width: 880px; width: 100%; max-height: 88vh; overflow: auto; background: var(--paper); display: grid; grid-template-columns: 40% 60%; position: relative; box-shadow: 14px 18px 0 rgba(0,0,0,.12); animation: slide-down .38s ease-out; }
.pattern-modal-line { background: #fbfaf7; border-right: 1px solid var(--line); display: grid; place-items: center; padding: 34px; min-height: 320px; }
.pattern-modal-line img { width: 100%; height: auto; max-height: 72vh; object-fit: contain; mix-blend-mode: multiply; }
.pattern-modal-glyph { font: 120px var(--serif); color: var(--red); opacity: .45; }
.pattern-modal-body { padding: 46px 40px; }
.technique-modal { display: block; max-width: 760px; }
.technique-modal .pattern-modal-body { padding: 46px 44px; }
.pattern-modal-body h2 { font: 600 26px var(--serif); letter-spacing: .1em; margin: 12px 0 0; }
.pattern-modal-body > p { color: #625e55; font: 13px/2.1 var(--serif); margin: 0 0 6px; }
.pattern-real { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 22px; }
.pattern-real h3 { font: 600 13px var(--serif); letter-spacing: .24em; color: var(--red); margin: 0 0 16px; }
.pattern-real-grid { display: grid; gap: 18px; }
.pattern-real-item { margin: 0; display: grid; grid-template-columns: 118px 1fr; gap: 14px; align-items: start; }
.pattern-real-item img { width: 118px; height: 118px; object-fit: cover; mix-blend-mode: multiply; border: 1px solid var(--line); background: #fbfaf7; }
.pattern-real-item figcaption strong { display: block; font: 13px var(--serif); }
.pattern-real-item figcaption em { display: block; color: var(--gold); font: 10px var(--serif); font-style: normal; margin: 4px 0 6px; }
.pattern-real-item figcaption p { margin: 0; color: var(--muted); font: 11px/1.9 var(--serif); }
.pattern-empty { margin-top: 22px; color: var(--muted); font: 11px var(--serif); border-top: 1px solid var(--line); padding-top: 18px; }
@media (max-width: 700px) { .pattern-modal { display: block; } .pattern-modal-line { border-right: 0; border-bottom: 1px solid var(--line); min-height: auto; padding: 22px; } .pattern-modal-body, .technique-modal .pattern-modal-body { padding: 26px 22px 30px; } .pattern-real-item { grid-template-columns: 86px 1fr; } .pattern-real-item img { width: 86px; height: 86px; } }

@media (max-width: 700px) {
.easter-egg-modal {
  display: block;
  max-height: 90vh;
  overflow: auto;
}

.easter-egg-name {
  min-height: 220px;
}

.easter-egg-content {
  padding: 30px 24px 34px;
}
}

/* ---------- 漆色图典（knowledge 页 · color 树状图 + 实物详情） ---------- */
.color-leaf { cursor: pointer; }
.color-leaf .node-toggle:hover .node-name strong { color: var(--red); }
.color-modal-hero { display: grid; place-items: center; gap: 12px; }
.color-hero-swatch { width: 116px; height: 116px; border-radius: 50%; background: var(--swatch); border: 3px solid rgba(255,255,255,.85); outline: 1px solid var(--line); box-shadow: 0 8px 26px rgba(0,0,0,.22); }
.color-hero-name { font: 600 22px var(--serif); letter-spacing: .12em; }
.color-hero-hex { color: var(--muted); font: 11px var(--serif); letter-spacing: .08em; }
