.template-tag-panel {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 16px;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  border-radius: 20px;
  background: rgba(var(--glass-surface-rgb), 0.98);
  border: 1px solid rgba(var(--glass-line-rgb), 0.96);
  box-shadow: var(--glass-shadow);
}

.template-tag-caption {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 700;
}

.template-tag-strip {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
}

.template-tag-button,
.template-token {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(217, 184, 55, 0.95);
  background: linear-gradient(180deg, #fff9d6, #ffef97);
  color: #6f5600;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  box-shadow: inset 0 -1px 0 rgba(133, 104, 0, 0.08);
}

.template-tag-button {
  width: 100%;
  min-height: 38px;
  justify-content: flex-start;
  padding: 0 12px;
  border-radius: 14px;
  cursor: pointer;
}

.template-token {
  display: inline-flex;
  padding: 0 4px;
  border: 1px solid rgba(217, 184, 55, 0.95);
  border-radius: 4px;
  background: rgba(255, 239, 151, 0.34);
  color: #6f5600;
  font: inherit;
  font-weight: inherit;
  line-height: 1.25;
  letter-spacing: inherit;
  box-shadow: inset 0 -1px 0 rgba(133, 104, 0, 0.12);
  text-decoration: none;
  user-select: all;
  white-space: nowrap;
  vertical-align: baseline;
}

.template-token[contenteditable="false"] {
  cursor: default;
}
