:root {
  --bg: #fdffeb;
  --text: #000000;
  --muted: rgba(0, 0, 0, 0.7);
  --panel: rgba(255, 255, 255, 0.36);
  --panel-border: rgba(0, 0, 0, 0.08);
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  --button-hover: rgba(0, 0, 0, 0.08);
  --button-active: rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "LXGWWENKAI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

@font-face {
  font-family: "LXGWWENKAI";
  src: url("./LXGWWENKAI-REGULAR.TTF") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.app {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 2.08fr);
  gap: 22px;
}

.sidebar,
.workspace {
  min-width: 0;
}

.brand {
  padding: 8px 4px 6px;
}

.eyebrow,
.toolbar__kicker {
  margin: 0 0 12px;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

h2,
p {
  margin: 0;
}

.intro {
  color: var(--muted);
  line-height: 1.6;
  max-width: 42ch;
}

.panel {
  border: 0;
  border-radius: 24px;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.panel--stack {
  margin-top: 20px;
  padding: 18px;
}

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

.panel h2,
.toolbar h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 0.82rem;
}

.badge--soft {
  background: transparent;
  color: var(--muted);
}

.filling-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 62vh;
  overflow: auto;
  padding-right: 2px;
}

.filling-list::-webkit-scrollbar,
.note-list::-webkit-scrollbar {
  width: 8px;
}

.filling-list::-webkit-scrollbar-thumb,
.note-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}

.filling-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  padding: 12px 14px;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.filling-btn:hover {
  transform: translateY(-1px);
  background: var(--button-hover);
}

.filling-btn.is-active {
  background: var(--button-active);
}

.filling-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.filling-name {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.filling-state {
  color: var(--muted);
  font-size: 0.84rem;
  white-space: nowrap;
}

.note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
  max-height: 24vh;
  overflow: auto;
  padding-right: 2px;
}

.workspace {
  display: grid;
  gap: 18px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 4px 0;
}

.toolbar h2 {
  max-width: 34ch;
}

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

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition:
    transform 180ms ease,
    background 180ms ease,
    opacity 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--button-hover);
}

.button--primary {
  background: transparent;
}

.button:active,
.button.is-active,
.button--primary:active {
  background: var(--button-active);
}

.viewer-card {
  position: relative;
  min-height: 720px;
  border-radius: 30px;
  overflow: hidden;
  border: 0;
  background: var(--bg);
  box-shadow: none;
}

#zongziCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.viewer-card__overlay {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
}

.overlay-chip {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  backdrop-filter: blur(10px);
  color: var(--text);
  font-size: 0.84rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.74fr);
  gap: 18px;
}

.recipe-panel,
.model-panel {
  padding: 18px;
}

.recipe-text {
  min-height: 64px;
  color: var(--muted);
  line-height: 1.75;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.recipe-tag {
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  font-size: 0.88rem;
  border: 0;
  background: rgba(0, 0, 0, 0.05);
}

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

  .filling-list {
    max-height: none;
  }

  .viewer-card {
    min-height: 540px;
  }
}

@media (max-width: 760px) {
  .toolbar,
  .panel__head,
  .summary-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .viewer-card {
    min-height: 440px;
    border-radius: 24px;
  }

  .panel,
  .panel--stack {
    border-radius: 20px;
  }

  .app {
    width: min(100% - 20px, 1460px);
    padding-top: 16px;
  }
}
