.tcf-tab-bar {
  display: flex;
  border-bottom: 1px solid #ddd;
  background: #fafafa;
}
.tcf-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.tcf-tab:hover { color: #333; }
.tcf-tab-active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  font-weight: 600;
}
.tcf-panel { padding: 16px; }
.tcf-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tcf-field-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 80px;
  flex-shrink: 0;
}
.tcf-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tcf-font-select {
  font-size: 14px;
}
.tcf-font-select option {
  padding: 3px 0;
}
.tcf-size-select option {
  line-height: 1.6;
}
.tcf-select {
  width: 100%;
  padding: 5px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 13px;
  background: #fff;
}
.tcf-color-input {
  width: 36px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 1px;
  cursor: pointer;
}
.tcf-preset-btn {
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.tcf-preset-btn:hover { background: #f0f0f0; }

/* Border preview — 2×2 grid with clickable outer/inner zones */
.tcf-border-preview {
  position: relative;
  width: 200px;
  height: 130px;
  background: #fafafa;
  margin-top: 4px;
}
.tcf-border-grid {
  position: absolute;
  top: 16px; right: 16px; bottom: 16px; left: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}
.tcf-border-gcell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #aaa;
}
.tcf-border-side {
  position: absolute;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s;
  z-index: 1;
}
.tcf-border-side:hover { background: rgba(26,115,232,0.12); }
.tcf-border-top    { top: 0; left: 0; right: 0; height: 16px; }
.tcf-border-bottom { bottom: 0; left: 0; right: 0; height: 16px; }
.tcf-border-left   { top: 16px; bottom: 16px; left: 0; width: 16px; }
.tcf-border-right  { top: 16px; bottom: 16px; right: 0; width: 16px; }
.tcf-border-insideH { top: 50%; left: 16px; right: 16px; height: 16px; margin-top: -8px; }
.tcf-border-insideV { left: 50%; top: 16px; bottom: 16px; width: 16px; margin-left: -8px; }

/* Text style buttons */
.tcf-style-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tcf-style-btn:hover { background: #f0f0f0; }
.tcf-style-active {
  background: #e3f0ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

/* Background color — two-column layout */
.tcf-bg-layout {
  display: flex;
  gap: 16px;
}
.tcf-bg-left { flex: 1; }
.tcf-bg-right {
  width: 160px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tcf-bg-none-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.tcf-bg-none-btn:hover { background: #f5f5f5; }
.tcf-bg-none-btn.tcf-bg-selected { border-color: #1a73e8; color: #1a73e8; }
.tcf-bg-grid {
  display: grid;
  grid-template-columns: repeat(10, 18px);
  gap: 3px;
}
.tcf-bg-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,.12);
  transition: transform 0.1s;
}
.tcf-bg-circle:hover {
  transform: scale(1.25);
  border-color: rgba(0,0,0,.4);
}
.tcf-bg-circle.tcf-bg-selected {
  border: 2px solid #1a73e8;
}
.tcf-bg-preview {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  color: #333;
  min-height: 40px;
  margin-top: auto;
}
.tcf-bg-recent-label {
  font-size: 11px;
  color: #666;
}
.tcf-bg-recent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tcf-bg-recent-cell {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s;
}
.tcf-bg-recent-cell:hover {
  border-color: rgba(0,0,0,.4);
  transform: scale(1.25);
}
/* Color pick button (shared for text + background) */
.tcf-color-pick-btn {
  padding: 4px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}
.tcf-color-pick-btn:hover { background: #f5f5f5; }
.tcf-color-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

/* Toolbar */
