:root {
  --zbtool-shell-padding: 12px;
  --zbtool-workspace-gap: 12px;
  --zbtool-work-gap: 14px;
  --zbtool-intro-font-size: 16px;
  --zbtool-lang-min-width: 180px;
  --zbtool-lang-label-size: 13px;
  --zbtool-lang-select-height: 38px;
  --zbtool-textarea-height: 420px;
  --zbtool-textarea-border: #cad6e6;
  --zbtool-textarea-bg: #fbfdff;
  --zbtool-textarea-color: #233047;
  --wc-ink: #233047;
  --wc-muted: #68758a;
  --wc-line: #dbe4f0;
  --wc-soft: #f4f8fc;
  --wc-accent: #0f766e;
  --wc-accent-2: #d97706;
  --wc-danger: #b42318;
  --wc-shadow: 0 22px 60px -38px rgba(15, 43, 80, 0.45);
}

.panel-work {
  overflow: hidden;
}

.wc-tool,
.wc-tool * {
  box-sizing: border-box;
}

.wc-tool {
  color: var(--wc-ink);
}

.wc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  align-items: stretch;
}

.wc-editor-card,
.wc-results-card,
.wc-insight-card {
  position: relative;
  border: 1px solid var(--wc-line);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--wc-shadow);
  padding: 18px;
}

.wc-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.wc-card-head.compact {
  margin-bottom: 12px;
}

.wc-card-head h2 {
  margin: 0;
  border: 0;
  padding: 0;
  color: var(--wc-ink);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  text-indent: 0;
  background: transparent;
}

.wc-card-head p {
  margin: 6px 0 0;
  color: var(--wc-muted);
  font-size: 13px;
  line-height: 1.6;
}

.wc-live-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  font-weight: 700;
}

.wc-input,
.zbtool-shell .work-col textarea.wc-input {
  display: block;
  width: 100% !important;
  min-height: var(--zbtool-textarea-height, 420px);
  height: var(--zbtool-textarea-height, 420px) !important;
  max-width: 100% !important;
  border: 1px solid var(--zbtool-textarea-border);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(15, 118, 110, 0.08) 32px);
  color: var(--zbtool-textarea-color);
  padding: 16px;
  font-size: 15px;
  line-height: 1.9;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wc-input:focus {
  border-color: rgba(15, 118, 110, 0.8);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  background: #fff;
}

.wc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.wc-actions button {
  border: 1px solid #cbd8e7;
  border-radius: 999px;
  background: #fff;
  color: #304057;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.wc-actions button:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.55);
  color: var(--wc-accent);
  box-shadow: 0 10px 22px -18px rgba(15, 43, 80, 0.8);
}

.wc-actions button.wc-danger {
  color: var(--wc-danger);
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff7f5;
}

.wc-notice {
  min-height: 20px;
  margin: 10px 2px 0;
  color: var(--wc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.wc-notice.is-ok {
  color: #047857;
}

.wc-notice.is-warn {
  color: var(--wc-danger);
}

.wc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wc-stat {
  min-height: 84px;
  border: 1px solid #e1e9f3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px;
}

.wc-stat span {
  display: block;
  color: var(--wc-muted);
  font-size: 12px;
  line-height: 1.35;
}

.wc-stat strong {
  display: block;
  margin-top: 8px;
  color: var(--wc-ink);
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  word-break: break-all;
}

.wc-stat-primary {
  border-color: rgba(15, 118, 110, 0.28);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.98), #fff 70%);
}

.wc-stat-primary strong {
  color: var(--wc-accent);
}

.wc-insights {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.wc-goal-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.wc-goal-row label {
  color: var(--wc-muted);
  font-size: 13px;
}

.wc-goal-row input {
  width: 100%;
  height: 40px;
  border: 1px solid #cbd8e7;
  border-radius: 12px;
  padding: 0 12px;
  color: var(--wc-ink);
  outline: none;
}

.wc-goal-row input:focus {
  border-color: rgba(15, 118, 110, 0.75);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.wc-progress {
  height: 10px;
  border-radius: 999px;
  background: #e6edf5;
  overflow: hidden;
  margin-top: 14px;
}

.wc-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--wc-accent), var(--wc-accent-2));
  transition: width 0.22s ease;
}

.wc-mini-text {
  margin: 10px 0 0;
  color: var(--wc-muted);
  font-size: 13px;
  line-height: 1.6;
}

.wc-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  color: var(--wc-muted);
  font-size: 13px;
  line-height: 1.6;
}

.wc-keyword {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 999px;
  background: #fff8ed;
  color: #8a4b05;
  padding: 6px 10px;
  line-height: 1;
  word-break: break-all;
}

.wc-detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.wc-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px dashed #dce5ef;
  padding-bottom: 9px;
}

.wc-detail-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.wc-detail-list dt,
.wc-detail-list dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.wc-detail-list dt {
  color: var(--wc-muted);
}

.wc-detail-list dd {
  color: var(--wc-ink);
  font-weight: 800;
}

.area-title {
  margin: 0 0 8px;
  color: #5b6472;
  font-size: 16px;
  font-weight: 600;
}

.result-box {
  height: 360px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  background: #f6f7f9;
  padding: 12px;
  box-sizing: border-box;
}

.stats {
  display: flex;
  gap: 16px;
  margin: 0;
  font-size: 15px;
}

@media (max-width: 1180px) {
  .wc-layout,
  .zbtool-shell .wc-layout {
    grid-template-columns: 1fr !important;
  }

  .wc-insights,
  .zbtool-shell .wc-insights {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 760px) {
  :root {
    --zbtool-textarea-height: 320px;
  }

  .wc-editor-card,
  .wc-results-card,
  .wc-insight-card {
    border-radius: 14px;
    padding: 14px;
  }

  .wc-card-head {
    display: block;
  }

  .wc-live-badge {
    display: inline-block;
    margin-top: 10px;
  }

  .wc-stats-grid,
  .wc-insights,
  .zbtool-shell .wc-insights {
    grid-template-columns: 1fr !important;
  }

  .wc-stat {
    min-height: auto;
  }

  .wc-stat strong {
    font-size: 24px;
  }

  .wc-actions button {
    flex: 1 1 calc(50% - 10px);
  }
}

@media (max-width: 420px) {
  .wc-actions button {
    flex-basis: 100%;
  }

  .wc-goal-row {
    grid-template-columns: 1fr;
  }
}
