/* 雫的皮肤工坊 — UI styles */
:root {
  --bg: #eaf4ff;
  --bg-2: #f7fbff;
  --card: #ffffff;
  --ink: #22364e;
  --ink-soft: #43597a;
  --muted: #7b90ab;
  --brand: #58b4e8;
  --brand-deep: #3c8fc9;
  --brand-soft: #eaf6ff;
  --pink: #f79ab4;
  --line: #e4eef9;
  --field: #f3f9ff;
  --shadow-sm: 0 2px 8px rgba(84, 140, 196, 0.1);
  --shadow: 0 12px 30px rgba(84, 140, 196, 0.16);
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Noto Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

input,
textarea {
  user-select: text;
  -webkit-user-select: text;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #eaf4ff 0%, #f3f9ff 46%, #ffffff 100%);
}

/* ---------------- top bar ---------------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px 8px;
  z-index: 4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, #ffffff 0%, #dff1ff 60%, #c8e7ff 100%);
  box-shadow: var(--shadow-sm), inset 0 1px 0 #fff;
}

.brand-logo svg {
  width: 30px;
  height: 30px;
}

.brand-text {
  min-width: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.3px;
}

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

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 14px;
  background: #fff;
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.15s ease;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.icon-btn:active {
  transform: scale(0.93);
  background: var(--brand-soft);
}

/* ---------------- stage ---------------- */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 4px 14px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #cfeaff 0%, #a9daf6 52%, #86c7ee 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 14px 34px rgba(78, 138, 196, 0.18);
  transition: background 0.3s ease;
}

.stage.is-checker {
  background-color: #f7fbff;
  background-image: linear-gradient(45deg, #e3edf7 25%, transparent 25%, transparent 75%, #e3edf7 75%),
    linear-gradient(45deg, #e3edf7 25%, transparent 25%, transparent 75%, #e3edf7 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

.stage::after {
  content: "";
  position: absolute;
  inset: auto -20% -46% -20%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}

#viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hud-top {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}

.chip {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 2px 8px rgba(70, 130, 190, 0.14);
  backdrop-filter: blur(6px);
}

.chip-soft {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
}

.hud-right {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
}

.round-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(70, 130, 190, 0.16);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.round-btn svg {
  width: 19px;
  height: 19px;
}

.round-btn.is-on {
  background: linear-gradient(150deg, #6ec3ef, #3c8fc9);
  color: #fff;
}

.round-btn:active {
  transform: scale(0.92);
}

.stage-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(34, 54, 78, 0.62);
  background: rgba(255, 255, 255, 0.72);
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: opacity 0.6s ease;
  z-index: 2;
}

.stage-hint.is-hidden {
  opacity: 0;
}

/* ---------------- toast ---------------- */
.toast {
  position: absolute;
  left: 50%;
  bottom: 46px;
  transform: translate(-50%, 8px);
  max-width: 82%;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.35;
  color: #fff;
  background: rgba(31, 52, 80, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 6;
  text-align: center;
}

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

/* ---------------- bottom sheet ---------------- */
.sheet {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  max-height: 42%;
  height: 42%;
  margin-top: 8px;
  padding: 8px 14px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -14px 34px rgba(84, 140, 196, 0.14);
  z-index: 3;
}

.tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #edf5fd;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

.tab.is-active {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: 0 3px 10px rgba(84, 140, 196, 0.16);
}

.panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: 12px;
}

.panel {
  display: none;
  animation: panel-in 0.22s ease;
}

.panel.is-active {
  display: block;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.link-btn {
  border: none;
  background: none;
  padding: 2px 0;
  color: var(--brand-deep);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
}

.link-btn:active {
  opacity: 0.6;
}

.hint {
  margin: 8px 0 2px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.tips {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #f6fbff, #eef7ff);
  display: grid;
  gap: 9px;
}

.tip {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.tip b {
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 400;
}

/* ---------------- skin strip ---------------- */
.skin-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 6px;
  scrollbar-width: none;
}

.online-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.online-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  outline: none;
  border-radius: var(--radius-sm);
  background: var(--field);
  padding: 10px 13px;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
}

.online-input::placeholder {
  color: #a9bccf;
}

.online-btn {
  flex: 0 0 auto;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  font-family: inherit;
  background: linear-gradient(140deg, #6ec3ef, #3c8fc9);
  box-shadow: 0 6px 14px rgba(60, 143, 201, 0.22);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.online-btn:active {
  transform: scale(0.97);
}

.online-btn[disabled] {
  opacity: 0.6;
}

.skin-strip::-webkit-scrollbar {
  display: none;
}

.skin-card {
  position: relative;
  flex: 0 0 auto;
  width: 82px;
  padding: 8px 6px 7px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background: var(--field);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  font-family: inherit;
  color: inherit;
}

.skin-card:active {
  transform: scale(0.96);
}

.skin-card.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.skin-card.is-active::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 2px #fff;
}

.skin-cover {
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #ffffff, #e8f2fb);
  overflow: hidden;
}

.skin-cover img {
  width: 54px;
  height: 54px;
  image-rendering: pixelated;
}

.skin-name {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-tag {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 1px;
}

.skin-card.is-add {
  border: 2px dashed #c9dff0;
  background: #fbfdff;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--brand-deep);
  font-size: 11px;
  height: 96px;
}

.skin-card.is-add svg {
  width: 22px;
  height: 22px;
}

/* ---------------- animations ---------------- */
.anim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.anim-btn {
  border: 2px solid transparent;
  background: var(--field);
  border-radius: var(--radius-sm);
  padding: 9px 2px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--ink-soft);
  font-family: inherit;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.anim-btn b {
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

.anim-btn:active {
  transform: scale(0.95);
}

.anim-btn.is-active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-deep);
}

/* ---------------- sliders ---------------- */
.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.slider-row label {
  flex: 0 0 34px;
  font-size: 12px;
  color: var(--muted);
}

.slider-row .val {
  flex: 0 0 44px;
  text-align: right;
  font-size: 11px;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  background: transparent;
  margin: 0;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b9e0f8, #7fc7ee);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 2px 6px rgba(60, 143, 201, 0.32);
}

/* ---------------- groups / segmented ---------------- */
.group {
  margin-top: 4px;
}

.group + .group {
  margin-top: 14px;
}

.group-title {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: #edf5fd;
}

.segmented button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 11px;
  padding: 9px 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  font-family: inherit;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.segmented button.is-active {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: 0 3px 9px rgba(84, 140, 196, 0.16);
}

/* ---------------- background swatches ---------------- */
.swatches {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
}

.swatches::-webkit-scrollbar {
  display: none;
}

.swatch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(90, 140, 190, 0.14);
  transition: transform 0.14s ease, border-color 0.14s ease;
  font-family: inherit;
}

.swatch:active {
  transform: scale(0.94);
}

.swatch.is-active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(88, 180, 232, 0.2);
}

.swatch.is-checker {
  background-color: #f7fbff;
  background-image: linear-gradient(45deg, #dfe9f4 25%, transparent 25%, transparent 75%, #dfe9f4 75%),
    linear-gradient(45deg, #dfe9f4 25%, transparent 25%, transparent 75%, #dfe9f4 75%);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}

.swatch-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  font-size: 9px;
  line-height: 14px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  background: rgba(20, 40, 64, 0.26);
}

.swatch.is-color {
  background: conic-gradient(from 0deg, #ff8fab, #ffd166, #8ce99a, #66d9e8, #a5b4fc, #ff8fab);
}

/* ---------------- toggles ---------------- */
.split-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.split-row .toggle-row {
  flex: 1;
  margin-top: 0;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--field);
  font-size: 13px;
  color: var(--ink-soft);
}

.toggle-row em {
  font-style: normal;
  font-size: 10px;
  color: var(--muted);
}

.toggle-row input {
  display: none;
}

.toggle-row i {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 25px;
  border-radius: 999px;
  background: #d7e6f3;
  transition: background 0.18s ease;
}

.toggle-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(60, 120, 180, 0.28);
  transition: transform 0.18s ease;
}

.toggle-row input:checked + i {
  background: linear-gradient(90deg, #78cbf0, #3c8fc9);
}

.toggle-row input:checked + i::after {
  transform: translateX(17px);
}

.toggle-row.is-disabled {
  opacity: 0.5;
}

.mini-btn {
  flex: 0 0 auto;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  box-shadow: inset 0 0 0 1.5px #cfe6f6;
}

.mini-btn:active {
  background: var(--brand-soft);
}

.text-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 4px 4px 4px 13px;
  border-radius: var(--radius-sm);
  background: var(--field);
}

.text-row label {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--ink-soft);
}

.text-row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  padding: 8px 8px 8px 0;
  font-size: 13px;
  color: var(--ink);
  font-family: inherit;
}

.text-row input::placeholder {
  color: #a9bccf;
}

/* ---------------- export ---------------- */
.export-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: var(--radius);
  padding: 13px 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  color: #fff;
  background: linear-gradient(140deg, #6ec3ef, #3c8fc9);
  box-shadow: 0 10px 20px rgba(60, 143, 201, 0.26);
}

.btn.ghost {
  color: var(--brand-deep);
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #cfe6f6;
}

.btn[disabled] {
  opacity: 0.5;
}

.export-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.export-preview-wrap {
  margin-top: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  background-color: #f7fbff;
  background-image: linear-gradient(45deg, #e3edf7 25%, transparent 25%, transparent 75%, #e3edf7 75%),
    linear-gradient(45deg, #e3edf7 25%, transparent 25%, transparent 75%, #e3edf7 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  min-height: 120px;
  display: grid;
  place-items: center;
}

.export-preview {
  display: block;
  max-width: 100%;
  max-height: 210px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.export-preview.is-ready {
  opacity: 1;
}

/* ---------------- dialog ---------------- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 44, 70, 0.36);
  z-index: 20;
  animation: fade-in 0.18s ease;
}

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

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

.dialog {
  width: 100%;
  max-width: 340px;
  border-radius: 24px;
  background: #fff;
  padding: 20px 20px 16px;
  box-shadow: 0 24px 50px rgba(20, 50, 90, 0.28);
  animation: dialog-in 0.2s ease;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.dialog h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.dialog-body {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-height: 46vh;
  overflow-y: auto;
}

.dialog-body p {
  margin: 0 0 8px;
}

.dialog-body a {
  color: var(--brand-deep);
  text-decoration: none;
  word-break: break-all;
}

.dialog-body .meta {
  font-size: 11.5px;
  color: var(--muted);
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.dialog-actions .btn {
  padding: 11px 10px;
  font-size: 13.5px;
}

/* ---------------- misc ---------------- */
.ios-safe {
  height: env(safe-area-inset-bottom);
}

/* ---------------- pose editor ---------------- */
.tab {
  font-size: 12px;
  padding: 9px 0;
}

.pose-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.pose-top .segmented {
  flex: 1;
}

.bone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

.bone-chip {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-family: inherit;
  color: var(--ink-soft);
  background: var(--field);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.bone-chip:active {
  transform: scale(0.95);
}

.bone-chip.is-active {
  color: #fff;
  background: linear-gradient(140deg, #6ec3ef, #3c8fc9);
  box-shadow: 0 6px 14px rgba(60, 143, 201, 0.24);
}

.pose-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--muted);
}

.pose-time-row #pose-time-label {
  flex: 1;
  color: var(--brand-deep);
  font-variant-numeric: tabular-nums;
}

.pose-time-row input[type="number"] {
  width: 58px;
  border: none;
  outline: none;
  border-radius: 10px;
  background: var(--field);
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink);
  font-family: inherit;
  text-align: right;
}

.pose-time-row .unit {
  font-size: 11px;
  color: var(--muted);
}

.timeline {
  width: 100%;
  margin-top: 6px;
}

.kf-buttons {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.kf-buttons .mini-btn,
.pose-io-row .mini-btn {
  flex: 1;
  padding: 10px 4px;
  font-size: 11.5px;
  white-space: nowrap;
}

.mini-btn.is-on {
  background: linear-gradient(140deg, #6ec3ef, #3c8fc9);
  color: #fff;
  box-shadow: 0 6px 14px rgba(60, 143, 201, 0.22);
}

.kf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 4px;
}

.kf-chip {
  border: none;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: inherit;
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-variant-numeric: tabular-nums;
}

.kf-chip.is-active {
  color: #fff;
  background: var(--brand-deep);
}

.kf-empty {
  font-size: 11px;
  color: var(--muted);
}

.text-row.compact {
  padding-left: 12px;
  margin-top: 12px;
}

.text-row.compact .mini-btn {
  padding: 9px 12px;
  font-size: 11.5px;
}

.clip-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.clip-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 12px;
  border-radius: 12px;
  background: var(--field);
  font-size: 12px;
  color: var(--ink-soft);
}

.clip-item button {
  border: none;
  background: none;
  padding: 2px 4px;
  font-size: 12px;
  font-family: inherit;
  color: var(--brand-deep);
  font-weight: 600;
}

.clip-item .clip-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip-item .clip-del {
  color: #d97b90;
}

.pose-io-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.pose-io-row .mini-btn {
  padding: 10px 4px;
}

.dialog-body textarea {
  width: 100%;
  min-height: 180px;
  border: none;
  outline: none;
  border-radius: 12px;
  background: var(--field);
  padding: 10px 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
}
